diff --git a/engine/common/common.c b/engine/common/common.c index 0ef608adf..929310a3e 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -2616,7 +2616,7 @@ void COM_DefaultExtension (char *path, const char *extension, int maxlen) // src = path + strlen(path) - 1; - while (*src != '/' && src != path) + while (src > path && *src != '/') { if (*src == '.') return; // it has an extension