Skip to content

Commit

Permalink
fix: 盘符大小写可能错误
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Aug 17, 2024
1 parent 4535fdf commit f93e40b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.0.9 / 2024-08-17

- fix: 盘符大小写可能错误。

## v1.0.8 / 2024-08-13

- fix: dbghelp计数错误。
Expand Down
6 changes: 5 additions & 1 deletion src/hook/hook.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ HANDLE WINAPI Hk_CreateFileW(
if (filename.find("\\\\?\\") == 0) {
filename.replace(0, 4, "");
}
spdlog::info("relative filename: {}", filename.c_str());
if ('a' <= filename[0] && filename[0] <= 'z')
{
filename[0] = 'A' + filename[0] - 'a';
}
spdlog::info("Absolute path: {}", filename.c_str());
}

if (config.find(filename.c_str()) != config.end())
Expand Down

0 comments on commit f93e40b

Please sign in to comment.