1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-28 11:00:34 +00:00

fix a potential crash bug

This commit is contained in:
Zeno Rogue 2018-07-27 22:14:46 +02:00
parent d32fe9192e
commit 4ae3733659

View File

@ -800,9 +800,6 @@ void init_textureconfig() {
addsaver(patterns::whichPattern, "pattern", 0);
addsaver(patterns::subpattern_flags, "pattern flags", 0);
cell *ctr = euclid ? centerover.c : viewctr.h->c7;
si_save = patterns::getpatterninfo0(ctr);
addsaver(si_save.id, "center type", 1);
addsaver(si_save.dir, "center direction", 0);
addsaver(si_save.reflect, "center reflection", false);
@ -844,6 +841,9 @@ bool texture_config::save() {
targetgeometry = geometry;
target_nonbitru = nonbitrunc;
cell *ctr = euclid ? centerover.c : viewctr.h->c7;
si_save = patterns::getpatterninfo0(ctr);
for(auto s: texturesavers) if(s->dosave())
fprintf(f, "%s=%s\n", s->name.c_str(), s->save().c_str());