From ba23d6bdecf4442354005931a4c4e0f83284a095 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Sun, 9 Jun 2019 16:03:15 +0800 Subject: [PATCH] file_io: fix extension compare #2. --- file_io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_io.cpp b/file_io.cpp index ec9478c..f4a72b6 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -1098,9 +1098,9 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons } char *fext = strrchr(de->d_name, '.'); + if(fext) fext++; while(!found && *ext && fext) { - fext++; char e[4]; memcpy(e, ext, 3); if (e[2] == ' ')