diff options
author | Paul Gilbert | 2011-06-26 18:51:12 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-06-26 18:51:12 +1000 |
commit | d5fdd094294becb49ef2adf0af00c4814c6efefe (patch) | |
tree | 50bd56dc3ab16a5a4c2509511be7e7374890aaf8 | |
parent | fe9dc10964ab4dc4528cc473ef841709732fceff (diff) | |
download | scummvm-rg350-d5fdd094294becb49ef2adf0af00c4814c6efefe.tar.gz scummvm-rg350-d5fdd094294becb49ef2adf0af00c4814c6efefe.tar.bz2 scummvm-rg350-d5fdd094294becb49ef2adf0af00c4814c6efefe.zip |
CGE: Bugfix for scanning archive index in BTFILE class
-rw-r--r-- | engines/cge/btfile.cpp | 3 | ||||
-rw-r--r-- | engines/cge/btfile.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/cge/btfile.cpp b/engines/cge/btfile.cpp index 0552e78c1c..a6ba3d85b0 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 6e6398f4de..449f200140 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 { |