From 31a12cb55dc518ebf193fa16293bc48b2d55092c Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 26 Aug 2024 21:28:16 -0500 Subject: [PATCH] fix istringstream usage --- src/game/boe.main.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 34c27817..89af4bf8 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -434,18 +434,9 @@ static void replay_next_action() { eSkill which_type; sstr >> which_type; - // Incredibly, this code isn't working despite being used as a pattern elsewhere: - // sstr.str(info["spell_forced"]); - // sstr >> std::boolalpha >> spell_forced; - - // But this code is: - if(info["spell_forced"] == "true"){ - spell_forced = true; - }else{ - spell_forced = false; - } - - // If I'm making an obvious error I just can't see it. + sstr.str(info["spell_forced"]); + sstr.seekg(0); + sstr >> std::boolalpha >> spell_forced; handle_spellcast(which_type, did_something, need_redraw, need_reprint); }else if(t == "handle_target_space"){