]> Kevux Git Server - fll/commitdiff
Bugfix: Invalid seeked value on failure in f_file_seek().
authorKevin Day <Kevin@kevux.org>
Thu, 5 Mar 2026 02:57:27 +0000 (20:57 -0600)
committerKevin Day <Kevin@kevux.org>
Thu, 5 Mar 2026 02:57:27 +0000 (20:57 -0600)
The previous commit 6dc28ff5673c86d8d6042b47538c2f66e7726717 left out the `seeked` NULL check before assigning a value.

level_0/f_file/c/file.c

index f4fa12b2091989dd31a12f1f0d629a8997bf0ef7..bc6e22401969e4adf82db16d5a90d85f1663831b 100644 (file)
@@ -1839,7 +1839,9 @@ extern "C" {
       return F_status_set_error(F_failure);
     }
 
-    *seeked = result;
+    if (seeked) {
+      *seeked = result;
+    }
 
     return F_okay;
   }