Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: oclass was not read properly from swapchest file
... after the change earlier to silence a compiler warning. Reading a character from the file is incorrect since we write oclass as an integer, so it would probably attempt to read the first digit of that integer as a character and set the resulting object's class to an invalid value. Who knows what undefined behavior would have resulted. Instead, read the oclass from the file into an int variable, then cast that to char for setting the actual object's class.
- Loading branch information