aboutsummaryrefslogtreecommitdiff
path: root/src/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.c')
-rw-r--r--src/fs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fs.c b/src/fs.c
index 77b34ee..9af58a9 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -660,10 +660,12 @@ bool pw_fs_seek(struct pw_fs *fs, pw_fd fd, int64_t offset,
// This is a little weird - but the final position needs to fit in
// a signed 64-bit value (even if we use unsigned `size_t` values
// internally). In practice, this should not matter.
+#if SIZE_MAX > INT64_MAX
if (pos > INT64_MAX) {
fs->err = PW_EOVERFLOW;
return SDL_SetError("seek overflows PICO-8 maximum position");
}
+#endif
s->pos = pos;
if (newpos) {