Skip to content

Commit

Permalink
Fix CELL size check when loading OPS saves
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Aug 5, 2019
1 parent e280fea commit ec0be1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/GameSave.cpp
Expand Up @@ -600,7 +600,7 @@ void GameSave::readOPS(char * data, int dataLength)
}

//Incompatible cell size
if (inputData[5] > CELL)
if (inputData[5] != CELL)
throw ParseException(ParseException::InvalidDimensions, "Incorrect CELL size");

//Too large/off screen
Expand Down
1 change: 1 addition & 0 deletions src/simulation/Gravity.cpp
Expand Up @@ -157,6 +157,7 @@ void Gravity::gravity_update_async()
memcpy(gravx, th_gravx, (XRES/CELL)*(YRES/CELL)*sizeof(float));
memcpy(gravp, th_gravp, (XRES/CELL)*(YRES/CELL)*sizeof(float));
#else
// Copy thread gravity maps into this one
std::swap(gravy, th_gravy);
std::swap(gravx, th_gravx);
std::swap(gravp, th_gravp);
Expand Down

0 comments on commit ec0be1c

Please sign in to comment.