From: Rick L Bird Date: Sat, 14 May 2011 18:01:51 +0000 (-0400) Subject: PennMUSH 1.8.3p12 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=6709c6ff3b9455f1241b463647318096b36d29f8;p=cobramush.git PennMUSH 1.8.3p12 Author: talvo@talvo.com Date: Tue Jan 26 00:21:22 2010 +0000 Fix a minor crashbug in @uptime Fixes #222 --- diff --git a/src/game.c b/src/game.c index e161c3d..15b639f 100644 --- a/src/game.c +++ b/src/game.c @@ -2166,7 +2166,7 @@ unix_uptime(dbref player __attribute__ ((__unused__))) return; } /* print system uptime */ - for (i = 0; (c = getc(fp)) != '\n'; i++) + for (i = 0; (c = getc(fp)) != '\n' && c != EOF ; i++) tbuf1[i] = c; tbuf1[i] = '\0'; pclose(fp);