diff --git a/source/blood/src/db.cpp b/source/blood/src/db.cpp index b54b6e8e8..652756ed3 100644 --- a/source/blood/src/db.cpp +++ b/source/blood/src/db.cpp @@ -1298,7 +1298,7 @@ int dbSaveMap(const char *pPath, int nX, int nY, int nZ, short nAngle, short nSe { nSize += sizeof(MAPHEADER2); } - for (int i = 0; i < nSpriteNum; i++) + for (int i = 0; i < gSkyCount; i++) tpskyoff[i] = pSky->tileofs[i]; nSize += gSkyCount*sizeof(tpskyoff[0]); nSize += sizeof(sectortype)*numsectors; diff --git a/source/build/include/build.h b/source/build/include/build.h index d1ee7676c..4fafc6fc6 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -876,6 +876,8 @@ EXTERN char show2dsector[(MAXSECTORS+7)>>3]; EXTERN char show2dwall[(MAXWALLS+7)>>3]; EXTERN char show2dsprite[(MAXSPRITES+7)>>3]; +EXTERN char wallcstat14[(MAXWALLS+7)>>3]; + // In the editor, gotpic is only referenced from inline assembly; // the compiler needs that hint or building with LTO will discard it. #if !defined __clang__ && !defined NOASM