mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49: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:
parent
fe56764fbc
commit
605b8a427c
1 changed files with 1 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue