changeset 717:e73200c4584a

Add some error status setting in memio.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Oct 2020 12:48:37 +0200
parents 7aee25fbc504
children ffd97ca9dfce
files th_ioctx_mem.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/th_ioctx_mem.c	Mon Oct 26 12:33:02 2020 +0200
+++ b/th_ioctx_mem.c	Mon Oct 26 12:48:37 2020 +0200
@@ -131,6 +131,7 @@
             break;
 
         default:
+            ctx->status = THERR_FSEEK;
             return -1;
     }
 
@@ -139,7 +140,10 @@
 
     // Check the new position
     if (newPos < 0)
+    {
+        ctx->status = THERR_FSEEK;
         return -1;
+    }
 
     //if (!th_mem_realloc(ctx, newPos))
     //    return -1;