uninitialized variable in logger
[dosdemo] / 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);