From b4a4af0a86c2ef6868eb2560e67c46fbaae233d8 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 23 Jan 2020 15:42:19 +0800 Subject: [PATCH] arcade: filter out non-rbf files. --- support/arcade/romutils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/arcade/romutils.cpp b/support/arcade/romutils.cpp index e36998a..b48f8c4 100644 --- a/support/arcade/romutils.cpp +++ b/support/arcade/romutils.cpp @@ -842,7 +842,8 @@ static const char *get_rbf(const char *xml) static char lastfound[256] = {}; while ((entry = readdir(dir)) != NULL) { - if (entry->d_type != DT_DIR) + len = strlen(entry->d_name); + if (entry->d_type != DT_DIR && len > 4 && !strcasecmp(entry->d_name+len-4,".rbf")) { static char newstring[kBigTextSize]; //printf("entry name: %s\n",entry->d_name);