Wrote more tests, fixed another nasty bug

This commit is contained in:
Mike Dvorkin
2010-08-14 22:13:09 -07:00
parent f8ba6a911b
commit 1753a4810a
6 changed files with 43 additions and 29 deletions

View File

@@ -298,7 +298,7 @@ PTable pit_table_load(FILE *file)
read += fread(pt->slots, pt->record_size, pt->number_of_records, file);
if (HAS_ID(pt)) {
for(i = 1; i <= pt->number_of_slots; i++, pi++) {
if ((int)*pr == i) {
if (*(int *)pr == i) {
*pi = pr;
pr += pt->record_size;
}