diff --git a/core/imgread/gdi.cpp b/core/imgread/gdi.cpp index 5eaf87859..e1f650e93 100644 --- a/core/imgread/gdi.cpp +++ b/core/imgread/gdi.cpp @@ -36,9 +36,9 @@ Disc* load_gdi(const char* file) strncpy(path, file, sizeof(path)); path[sizeof(path) - 1] = '\0'; - size_t len = strlen(path); + ssize_t len = strlen(path); - while (len>2) + while (len>=0) { if (path[len]=='\\' || path[len]=='/') break; @@ -118,4 +118,4 @@ Disc* gdi_parse(const char* file) void iso_term() { -} \ No newline at end of file +}