mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
fixed a bug in parsing unary -
This commit is contained in:
parent
8220611718
commit
cfcd8a5e57
2
util.cpp
2
util.cpp
@ -327,7 +327,7 @@ cld exp_parser::parse(int prio) {
|
||||
else if(number == "e") res = exp(1);
|
||||
else if(number == "i") res = cld(0, 1);
|
||||
else if(number == "p" || number == "pi") res = M_PI;
|
||||
else if(number == "" && next() == '-') { at++; res = -parse(prio); }
|
||||
else if(number == "" && next() == '-') { at++; res = -parse(20); }
|
||||
else if(number == "") throw hr_parse_exception("number missing, " + where());
|
||||
else if(number == "s") res = ticks / 1000.;
|
||||
else if(number == "ms") res = ticks;
|
||||
|
Loading…
Reference in New Issue
Block a user