mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
fixed crash happening sometimes when loading a different geometry
This commit is contained in:
parent
f5a8b2a0c2
commit
908d581c15
@ -166,6 +166,7 @@ namespace mapstream {
|
|||||||
bool loadMap(const char *fname) {
|
bool loadMap(const char *fname) {
|
||||||
f = fopen(fname, "rb");
|
f = fopen(fname, "rb");
|
||||||
if(!f) return false;
|
if(!f) return false;
|
||||||
|
clearMemory();
|
||||||
int vernum = loadInt();
|
int vernum = loadInt();
|
||||||
printf("vernum = %d\n", vernum);
|
printf("vernum = %d\n", vernum);
|
||||||
if(vernum >= 7400) load(mapeditor::whichPattern);
|
if(vernum >= 7400) load(mapeditor::whichPattern);
|
||||||
@ -191,7 +192,6 @@ namespace mapstream {
|
|||||||
|
|
||||||
resetGeometry();
|
resetGeometry();
|
||||||
|
|
||||||
clearMemory();
|
|
||||||
initcells();
|
initcells();
|
||||||
if(shmup::on) shmup::init();
|
if(shmup::on) shmup::init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user