From d8ab5529a700cdf2ec5dd09cab580180d53fe717 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 11 Mar 2024 21:39:45 -0700 Subject: [PATCH] GB: Fix type coercion --- src/gb/gb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gb/gb.c b/src/gb/gb.c index 958312524..b3bb62a80 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -106,7 +106,7 @@ static void GBDeinit(struct mCPUComponent* component) { bool GBLoadGBX(struct GBXMetadata* metadata, struct VFile* vf) { uint8_t footer[16]; - if (vf->seek(vf, -sizeof(footer), SEEK_END) < 0) { + if (vf->seek(vf, -(off_t) sizeof(footer), SEEK_END) < 0) { return false; } if (vf->read(vf, footer, sizeof(footer)) < (ssize_t) sizeof(footer)) { @@ -1100,7 +1100,7 @@ bool GBIsROM(struct VFile* vf) { } uint8_t footer[16]; - vf->seek(vf, -sizeof(footer), SEEK_END); + vf->seek(vf, -(off_t) sizeof(footer), SEEK_END); if (vf->read(vf, footer, sizeof(footer)) < (ssize_t) sizeof(footer)) { return false; }