Mercurial > mm7
diff Chest.cpp @ 1554:e303d8a9bcdc
Merge
author | Grumpy7 |
---|---|
date | Sat, 07 Sep 2013 21:14:48 +0200 |
parents | c4ab816fcc5e |
children | 75fafd8ced59 |
line wrap: on
line diff
--- a/Chest.cpp Sat Sep 07 21:00:02 2013 +0200 +++ b/Chest.cpp Sat Sep 07 21:14:48 2013 +0200 @@ -3,7 +3,6 @@ #endif #include <stdio.h> -#include <assert.h> #include "BSPModel.h" #include "Items.h" @@ -617,7 +616,8 @@ v2 = fopen("data\\dchest.bin", "wb"); v3 = v2; if ( !v2 ) - Abortf("Unable to save dchest.bin!"); + Error("Unable to save dchest.bin!"); + fwrite(v1, 4u, 1u, v2); fwrite(v1->pChests, 0x24u, v1->uNumChests, v3); fclose(v3); @@ -671,7 +671,8 @@ v4 = fopen(Args, "r"); File = v4; if ( !v4 ) - Abortf("ChestDescriptionList::load - Unable to open file: %s."); + Error("ChestDescriptionList::load - Unable to open file: %s."); + v5 = 0; Argsa = 0; if ( fgets(&Buf, 490, v4) ) @@ -692,7 +693,8 @@ v7 = pAllocator->AllocNamedChunk(v6, 36 * v5, "Chest Descrip"); v2->pChests = (ChestDesc *)v7; if ( v7 == (void *)v3 ) - Abortf("ChestDescriptionList::load - Out of Memory!"); + Error("ChestDescriptionList::load - Out of Memory!"); + memset(v7, v3, 36 * v2->uNumChests); v8 = File; v2->uNumChests = v3;