mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-03-14 00:59:43 +00:00
Merge pull request #477 from josephcsible/iparsecrash
Don't crash when manually entering pinned glyph config
This commit is contained in:
9
hud.cpp
9
hud.cpp
@@ -88,8 +88,13 @@ EX void updateglyphpinned() {
|
||||
exp_parser ep;
|
||||
ep.s = pinnedglyphs;
|
||||
do {
|
||||
int i = ep.iparse();
|
||||
if(i >= 0 && i < glyphs) glyphpinned[i] = true;
|
||||
try {
|
||||
int i = ep.iparse();
|
||||
if(i >= 0 && i < glyphs) glyphpinned[i] = true;
|
||||
}
|
||||
catch(hr_parse_exception&) {
|
||||
continue;
|
||||
}
|
||||
} while(ep.eat(","));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user