uninitialized variable in logger
authorJohn Tsiombikas <nuclear@member.fsf.org>
Tue, 10 May 2022 23:36:46 +0000 (02:36 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Tue, 10 May 2022 23:36:46 +0000 (02:36 +0300)
src/dos/logger.c

index 2d61070..1976770 100644 (file)
@@ -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);