fix issues

This commit is contained in:
2024-02-15 13:34:06 +09:00
parent e07604dc4b
commit eaaad38fac
3 changed files with 11 additions and 8 deletions

View File

@@ -86,11 +86,17 @@ int main(int argc, char** argv) {
fprintf(stderr, "failed to read BLOB in BLOB chunk\n");
return EXIT_FAILURE;
}
INDENT_PRINT("-BLOB: %.*s", (int) size, (const char*) buf);
if (size <= 8U) {
uint64_t v = 0U;
memcpy(&v, buf, size);
INDENT_PRINT("-BLOB: 0x%" PRIu64 " (size:%" PRIu64 ")", v, size);
} else {
INDENT_PRINT("-BLOB: %.*s", (int) size, (const char*) buf);
}
} break;
case ACG_CHUNK_CTX: {
uint64_t time;
if (!acg_stream_read_uint(&s, &time, 64U)) {
if (!acg_stream_read_uint(&s, &time, 32U)) {
fprintf(stderr, "failed to read TIME in CTX chunk\n");
return EXIT_FAILURE;
}