GB: Fix type coercion

This commit is contained in:
Vicki Pfau 2024-03-11 21:39:45 -07:00
parent 369e6a03f4
commit d8ab5529a7
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}