diff --git a/engines/cge/btfile.cpp b/engines/cge/btfile.cpp index 0552e78c1cc..a6ba3d85b09 100644 --- a/engines/cge/btfile.cpp +++ b/engines/cge/btfile.cpp @@ -101,9 +101,10 @@ BT_KEYPACK *BTFILE::Find(const char *key) { // search if (pg->Hea.Down != BT_NONE) { int i; - for (i = 0; i < pg->Hea.Count; i ++) + for (i = 0; i < pg->Hea.Count; i ++) { if (memicmp(key, pg->Inn[i].Key, BT_KEYLEN) < 0) break; + } nxt = (i) ? pg->Inn[i - 1].Down : pg->Hea.Down; Buff[lev].Indx = i - 1; ++ lev; diff --git a/engines/cge/btfile.h b/engines/cge/btfile.h index 6e6398f4de3..449f2001405 100644 --- a/engines/cge/btfile.h +++ b/engines/cge/btfile.h @@ -39,6 +39,7 @@ namespace CGE { #define BT_NONE 0xFFFF #define BT_ROOT 0 +#include "common/pack-start.h" // START STRUCT PACKING struct BT_KEYPACK { char Key[BT_KEYLEN]; @@ -66,6 +67,8 @@ struct BT_PAGE { }; }; +#include "common/pack-end.h" // END STRUCT PACKING + class BTFILE : public IOHAND { struct {