Skip to content

Commit fb9b8fe

Browse files
authored
Merge pull request jdart1#6 from Matthies/master
Fix mapping offset for wide dtz tables.
2 parents c135b09 + fcbcb50 commit fb9b8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tbprobe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ static bool init_table(struct BaseEntry *be, const char *str, int type)
15621562
} else {
15631563
data += (uintptr_t)data & 0x01;
15641564
for (int i = 0; i < 4; i++) {
1565-
mapIdx[t][i] = (uint16_t)(data + 1 - (uint8_t *)map);
1565+
mapIdx[t][i] = (uint16_t)((uint16_t*)data + 1 - (uint16_t *)map);
15661566
data += 2 + 2 * read_le_u16(data);
15671567
}
15681568
}

0 commit comments

Comments
 (0)