diff --git a/polymer/eduke32/source/m32def.c b/polymer/eduke32/source/m32def.c index f4f38fc9f..e52d74ac0 100644 --- a/polymer/eduke32/source/m32def.c +++ b/polymer/eduke32/source/m32def.c @@ -3741,7 +3741,7 @@ void C_Compile(const char *filenameortext, int32_t isfilename) fp = kopen4load(mptr, 0 /*g_loadFromGroupOnly*/); if (fp == -1) // JBF: was 0 { - if (fs >= 4 && Bmemcmp(&mptr[fs-4], ".m32", 4) != 0) + if (fs < 4 || Bmemcmp(&mptr[fs-4], ".m32", 4) != 0) { Bstrcat(&mptr[fs], ".m32"); fp = kopen4load(mptr, 0 /*g_loadFromGroupOnly*/);