summaryrefslogtreecommitdiff
path: root/src/script/script_instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/script_instance.cpp')
-rw-r--r--src/script/script_instance.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp
index f7f9de4fc..fadbba70d 100644
--- a/src/script/script_instance.cpp
+++ b/src/script/script_instance.cpp
@@ -116,8 +116,7 @@ bool ScriptInstance::LoadCompatibilityScripts(const char *api_version, Subdirect
{
char script_name[32];
seprintf(script_name, lastof(script_name), "compat_%s.nut", api_version);
- Searchpath sp;
- FOR_ALL_SEARCHPATHS(sp) {
+ for (Searchpath sp : _valid_searchpaths) {
std::string buf = FioGetDirectory(sp, dir);
buf += script_name;
if (!FileExists(buf)) continue;