From 0322f357aebb8e1c22f1d929f13bf5c555d95bb9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 27 May 2017 10:31:06 -0700 Subject: [PATCH] Extract tableid. --- dump.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dump.c b/dump.c index c737c01d1d..1b7a8ed8e7 100644 --- a/dump.c +++ b/dump.c @@ -63,6 +63,15 @@ get_u32(void) return x; } +static unsigned long long int +get_u64(void) +{ + uint64_t x; + memcpy(&x, &data[pos], 8); + pos += 8; + return x; +} + static unsigned int get_be32(void) { @@ -1290,14 +1299,8 @@ main(int argc, char *argv[]) pos++; pos++; - /* Offset 31. - - This is the tableId, e.g. -4154297861994971133 would be 0xdca00003. - We don't have enough context to validate it. */ - pos += 4; - - /* Offset 35. */ - pos += 4; + /* Offset 31. */ + printf("%lld", get_u64()); dump_title (); dump_fonts(); -- 2.30.2