diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-08 11:23:19 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-08 11:23:19 +0100 |
commit | b464bb7fd43a86264e816e950ccac1d6845b0230 (patch) | |
tree | 1070200f94f1f7adf4ae26950011884e1956576d /src/skel/crossplatform.cpp | |
parent | Use our synonyms for attack anims again (diff) | |
parent | reorganize shaders; use modulate flag; update librw (diff) | |
download | re3-b464bb7fd43a86264e816e950ccac1d6845b0230.tar re3-b464bb7fd43a86264e816e950ccac1d6845b0230.tar.gz re3-b464bb7fd43a86264e816e950ccac1d6845b0230.tar.bz2 re3-b464bb7fd43a86264e816e950ccac1d6845b0230.tar.lz re3-b464bb7fd43a86264e816e950ccac1d6845b0230.tar.xz re3-b464bb7fd43a86264e816e950ccac1d6845b0230.tar.zst re3-b464bb7fd43a86264e816e950ccac1d6845b0230.zip |
Diffstat (limited to 'src/skel/crossplatform.cpp')
-rw-r--r-- | src/skel/crossplatform.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp index 37c94cb4..68df6704 100644 --- a/src/skel/crossplatform.cpp +++ b/src/skel/crossplatform.cpp @@ -32,8 +32,8 @@ HANDLE FindFirstFile(const char* pathname, WIN32_FIND_DATA* firstfile) { char *folder = strtok(pathCopy, "*"); char *extension = strtok(NULL, "*"); - // because strtok doesn't return NULL for last delimiter - if (extension - folder == strlen(pathname)) + // because I remember like strtok might not return NULL for last delimiter + if (extension && extension - folder == strlen(pathname)) extension = nil; // Case-sensitivity and backslashes... @@ -187,7 +187,7 @@ char* casepath(char const* path, bool checkPathFirst) rl = 1; } - bool cantProceed = false; // just convert slashes in what's left in string, not case sensitivity + bool cantProceed = false; // just convert slashes in what's left in string, don't correct case of letters(because we can't) bool mayBeTrailingSlash = false; char* c; while (c = strsep(&p, "/\\")) @@ -251,7 +251,7 @@ char* casepath(char const* path, bool checkPathFirst) } if (rl > l + 2) { - printf("\n\ncasepath: Corrected path length is longer then original+2:\n\tOriginal: %s (%d chars)\n\tCorrected: %s (%d chars)\n\n", path, l, out, rl); + printf("\n\ncasepath: Corrected path length is longer then original+2:\n\tOriginal: %s (%zu chars)\n\tCorrected: %s (%zu chars)\n\n", path, l, out, rl); } return out; } |