mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01:00
Fix a couple spots where sizeof referred to array size
This commit is contained in:
parent
641277b430
commit
8e4be6112d
1 changed files with 2 additions and 2 deletions
|
@ -4659,7 +4659,7 @@ void Game::loadstats()
|
||||||
if (TextString.length())
|
if (TextString.length())
|
||||||
{
|
{
|
||||||
std::vector<std::string> values = split(TextString, ',');
|
std::vector<std::string> values = split(TextString, ',');
|
||||||
for (size_t i = 0; i < std::min(sizeof(bestframes), values.size()); i++)
|
for (size_t i = 0; i < std::min(sizeof(bestframes) / sizeof(int), values.size()); i++)
|
||||||
{
|
{
|
||||||
bestframes[i] = atoi(values[i].c_str());
|
bestframes[i] = atoi(values[i].c_str());
|
||||||
}
|
}
|
||||||
|
@ -4980,7 +4980,7 @@ void Game::savestats()
|
||||||
dataNode->LinkEndChild( msg );
|
dataNode->LinkEndChild( msg );
|
||||||
|
|
||||||
std::string s_bestframes;
|
std::string s_bestframes;
|
||||||
for (size_t i = 0; i < sizeof(bestframes); i++)
|
for (size_t i = 0; i < sizeof(bestframes) / sizeof(int); i++)
|
||||||
{
|
{
|
||||||
s_bestframes += help.String(bestframes[i]) + ",";
|
s_bestframes += help.String(bestframes[i]) + ",";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue