1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Make 'custom_' check more readable

Instead of copying to a temporary string, just use SDL_strncmp(). Also,
I checked the blame, and apparently I committed the line that used
strcmp() instead of SDL_strcmp(), for whatever reason. But that's fixed
now.
This commit is contained in:
Misa 2020-09-27 13:21:47 -07:00 committed by Ethan Lee
parent fe56764fbc
commit 605b8a427c

View file

@ -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);
}