Skip to content

Commit 17c5ece

Browse files
committed
fix logical error
1 parent 9afc077 commit 17c5ece

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <iostream>
22
#include <fstream>
33
#include <string>
4-
#include <string_view>
54
#include <filesystem>
65

76
const uint32_t PatchOffset = 0x2A7;
@@ -36,7 +35,9 @@ std::string GetNewPath(const std::string& filePath) {
3635
std::string directory = path.parent_path().string();
3736
std::string defaultSeperator = "";
3837
std::string separator;
39-
if (!directory.empty())
38+
if (directory.empty())
39+
separator = defaultSeperator;
40+
else
4041
separator = std::filesystem::path::preferred_separator;
4142
return directory + separator + fileName + "_patched.exe";
4243
}

0 commit comments

Comments
 (0)