diff --git a/src/datafile.cc b/src/datafile.cc index bccd470..00e9824 100644 --- a/src/datafile.cc +++ b/src/datafile.cc @@ -89,7 +89,7 @@ unsigned char* datafileReadRaw(char* path, int* widthPtr, int* heightPtr) char* mangledPath = gDatafileNameMangler(path); char* dot = strrchr(mangledPath, '.'); if (dot != NULL) { - if (compat_stricmp(dot + 1, "pcx")) { + if (compat_stricmp(dot + 1, "pcx") == 0) { return pcxRead(mangledPath, widthPtr, heightPtr, gDatafilePalette); } }