From 8f8de5de2b8e7f59c73a3506f4360071ddae8ae5 Mon Sep 17 00:00:00 2001 From: DTB Date: Mon, 8 Jul 2024 22:53:44 -0600 Subject: [PATCH] dj(1): fix io[0].bufuse underflow --- src/dj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dj.c b/src/dj.c index e36623e..3b5bc5f 100644 --- a/src/dj.c +++ b/src/dj.c @@ -268,7 +268,7 @@ int main(int argc, char *argv[]){ /* hack to intentionally get a partial read from Io_read */ if((skipping = MIN(io[0].seek, io[0].bs)) > 0) - io[0].bufuse = io[0].bs - io[0].seek; + io[0].bufuse = io[0].bs - (size_t)skipping; t = io[0].bufuse; if(Io_read(&io[0])->bufuse == t && !noerror && io[0].error == 0)