回复 40楼 cyxcpyzc
這個是bug,修正如下:在tools.cpp中GetJustFileName()函數代碼:
程序代码:
const std::string GetJustFileName(const char* str) { const char* ptr_start = strrchr(str, '\\'); if (!ptr_start) { ptr_start = str; } else { ++ptr_start; } const char* ptr_end = strrchr(str, '.'); if (!ptr_end) { ptr_end = strrchr(str, '\0'); } size_t start = ptr_start - str; size_t count = ptr_end - ptr_start; return std::string(str, start, count); }
授人以渔,不授人以鱼。