From: John Tsiombikas Date: Tue, 10 May 2022 23:36:46 +0000 (+0300) Subject: uninitialized variable in logger X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=commitdiff_plain;h=d591d56c7214fe25f93bc7a439c37b47fc5e5aea uninitialized variable in logger --- diff --git a/src/dos/logger.c b/src/dos/logger.c index 2d61070..1976770 100644 --- a/src/dos/logger.c +++ b/src/dos/logger.c @@ -49,6 +49,7 @@ int print_tail(const char *fname) if(!(fp = fopen(fname, "r"))) { return -1; } + wr = rd = 0; lineoffs[wr++] = 0; while(fgets(buf, sizeof buf, fp)) { lineoffs[wr] = ftell(fp);