mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Check valid
in binaryBlob::getIndex()
The binary blob shouldn't return an index if it ends up being invalid. That could cause a whole lot of issues if musicclass ends up parsing the resulting struct. With all that said, though, musicclass doesn't check the -1 sentinel value anyway, even though it should, but that'll be fixed later.
This commit is contained in:
parent
751e621c14
commit
7903b8967e
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ int binaryBlob::getIndex(const char* _name)
|
|||
{
|
||||
for (size_t i = 0; i < SDL_arraysize(m_headers); i += 1)
|
||||
{
|
||||
if (strcmp(_name, m_headers[i].name) == 0)
|
||||
if (strcmp(_name, m_headers[i].name) == 0 && m_headers[i].valid)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue