]> Zhao Yanbai Git Server - minix.git/commitdiff
NUL terminate timingdata[cat].names instead of timingdata[0].names. Reported
authorPhilip Homburg <philip@cs.vu.nl>
Mon, 28 Aug 2006 15:30:14 +0000 (15:30 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Mon, 28 Aug 2006 15:30:14 +0000 (15:30 +0000)
by <devel@pop3.ru>.

kernel/debug.c

index dd7303d5da0ce8dfe0ff8d7bd6d6778331f16303..a686b5a9575928a2b0a932e44e70f4817bef91ed 100644 (file)
@@ -27,7 +27,7 @@ void timer_start(int cat, char *name)
 
        for(i = 0; i < sizeof(timingdata[0].names) && *name; i++)
                timingdata[cat].names[i] = *name++;
-       timingdata[0].names[sizeof(timingdata[0].names)-1] = '\0';
+       timingdata[cat].names[sizeof(timingdata[0].names)-1] = '\0';
 
        if (starttimes[cat][HIGHCOUNT]) {  return; }