mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-03-30 21:51:46 +03:00
Region system PR review changes
Fixes errors or oversights with the region system for the PR review
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
1fb0afb99d
commit
54b2aaae96
@@ -447,7 +447,7 @@ void GraphicsResources::init(void)
|
||||
|
||||
EnumHandle handle = {};
|
||||
const char* item;
|
||||
char full_item[73];
|
||||
char full_item[64];
|
||||
while ((item = FILESYSTEM_enumerateAssets("graphics", &handle)) != NULL)
|
||||
{
|
||||
if (SDL_strncmp(item, "region", 6) != 0)
|
||||
@@ -456,6 +456,11 @@ void GraphicsResources::init(void)
|
||||
}
|
||||
char* end;
|
||||
int i = SDL_strtol(&item[6], &end, 10);
|
||||
// make sure the region id is actually in bounds!
|
||||
if (i < 1 || i > 400)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (item == end || SDL_strcmp(end, ".png") != 0)
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user