- if (packet_index.packet_size > (filestats.st_size - packet_index.offset) * CHAR_BIT) {
- fprintf(stderr, "[error] Packet size (%zu bits) is larger than remaining file size (%zu bits).\n",
- packet_index.content_size, (size_t) (filestats.st_size - packet_index.offset) * CHAR_BIT);
+ if (packet_index.packet_size > ((uint64_t)filestats.st_size - packet_index.offset) * CHAR_BIT) {
+ fprintf(stderr, "[error] Packet size (%" PRIu64 " bits) is larger than remaining file size (%" PRIu64 " bits).\n",
+ packet_index.content_size, ((uint64_t)filestats.st_size - packet_index.offset) * CHAR_BIT);