Fix CELL size check when loading OPS saves

This commit is contained in:
jacob1 2019-08-05 00:22:37 -04:00
parent e280fea031
commit ec0be1cdc9
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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);