From 72ddd9bdb4a1b7126c4d772147e30dc90aadec06 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 18 May 2020 14:16:23 -0700 Subject: [PATCH] Fix having atoi() called on it when loading quicksave For some reason (probably a copy-paste error), this XML tag gets atoi() called on it before being assigned to Game::hardestroom. And only when loading a quicksave, at that. This would result in Game::hardestroom being set to an empty string, which if you kept until Game Complete, would end up rendering as a single null byte (if you even have a font face for said null byte). I'm not sure how this error compiles in the first place, but whatever. --- desktop_version/src/Game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index c696841a..841f91a6 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -5118,7 +5118,7 @@ void Game::loadquick() } else if (pKey == "hardestroom") { - hardestroom = atoi(pText); + hardestroom = pText; } else if (pKey == "hardestroomdeaths") { @@ -5387,7 +5387,7 @@ void Game::customloadquick(std::string savfile) } else if (pKey == "hardestroom") { - hardestroom = atoi(pText); + hardestroom = pText; } else if (pKey == "hardestroomdeaths") {