From db8891fa3c03530dc8ac612e700a7391f0e5391f Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Thu, 26 Oct 2017 20:35:47 +1100 Subject: [PATCH] Fixup f878433 Issue pointed out by @jyrkive. The new loop would skip any character identical to the first one instead of only skipping the first one. --- src/team.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/team.cpp b/src/team.cpp index c098e5c1a747..366f23179a78 100644 --- a/src/team.cpp +++ b/src/team.cpp @@ -874,14 +874,14 @@ void team::shroud_map::read(const std::string& str) void team::shroud_map::merge(const std::string& str) { int x = 0, y = 0; - for(const char sh : str) { - if(sh == '|' && sh != str.front()) { + for(int i = 1; i < str.length(); ++i) { + if(str[i] == '|') { y = 0; x++; - } else if(sh == '1') { + } else if(str[i] == '1') { clear(x, y); y++; - } else if(sh == '0') { + } else if(str[i] == '0') { y++; } }