diff --git a/desktop_version/src/Scripts.cpp b/desktop_version/src/Scripts.cpp index afc25260..df7a4ac5 100644 --- a/desktop_version/src/Scripts.cpp +++ b/desktop_version/src/Scripts.cpp @@ -11,10 +11,7 @@ void scriptclass::load(const std::string& name) const char* t = name.c_str(); - char customstring[8] = {'\0'}; - SDL_strlcpy(customstring, t, sizeof(customstring)); - - if (strcmp(customstring, "custom_") == 0) + if (SDL_strncmp(t, "custom_", 7) == 0) { loadcustom(name); }