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.
This commit is contained in:
parent
c49c7263ba
commit
db8891fa3c
1 changed files with 4 additions and 4 deletions
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue