1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed a crash with the -tparx option

This commit is contained in:
Zeno Rogue 2019-05-24 22:35:13 +02:00
parent 7498db911d
commit f2fd4c12c2

View File

@ -869,11 +869,16 @@ int read_geom_args() {
}
else if(argis("-tparx")) {
shift();
sscanf(argcs(), "%d,%d,%d",
(int*) &torusconfig::torus_mode,
int tmode;
sscanf(argcs(), "%d,%d,%d", &tmode,
&torusconfig::sdx,
&torusconfig::sdy
);
if(tmode < 0 || tmode >= isize(torusconfig::tmodes)) {
println(hlog, "bad tmode");
exit(1);
}
torusconfig::torus_mode = torusconfig::eTorusMode(tmode);
if(torusconfig::torus_mode == torusconfig::tmSingle)
torusconfig::qty = torusconfig::sdx,
torusconfig::dy = torusconfig::sdy;