From faa7cdc501f5290d45ef02b159d849a77641db7c Mon Sep 17 00:00:00 2001 From: mdiluzio Date: Wed, 31 Dec 2014 18:39:11 +0000 Subject: [PATCH] Fix bug when loading games with walls Game would fail to load as it was cutting off the first [ --- source/ttrts/formatters.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ttrts/formatters.cpp b/source/ttrts/formatters.cpp index 0127803..6d6d03a 100644 --- a/source/ttrts/formatters.cpp +++ b/source/ttrts/formatters.cpp @@ -92,7 +92,7 @@ CTTRTSGame GetGameFromString( const std::string& input ) size_t pos; while ( ( pos = walls_str.find(']') ) != std::string::npos ) { - std::string pos_string = walls_str.substr(1,pos); + std::string pos_string = walls_str.substr(0,pos); // Use scanf to extract positions @@ -209,4 +209,4 @@ SOrder GetOrderFromString( const std::string& order ) ret.unit = unit; return ret; -} \ No newline at end of file +}