mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
CGE: Bugfix for scanning archive index in BTFILE class
This commit is contained in:
parent
fe9dc10964
commit
d5fdd09429
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user