Thread View: net.games.pacm
1 messages
1 total messages
Started by utzoodecvaxpur-eeks
Sat, 19 Jun 1982 01:01
core dump fix... - (nf)
Author: utzoodecvaxpur-eeks
Date: Sat, 19 Jun 1982 01:01
Date: Sat, 19 Jun 1982 01:01
57 lines
1699 bytes
1699 bytes
#N:pur-ee:5000001:000:1287
pur-ee!ks Jun 18 17:56:00 1982
Pacman has been core dumping on me lately and I tracked down the reason.
When the high scores are printed, the users login is determined from his
user id. If the account has been deactivated, it just screws up. Here
is the simple fix for the file util.h. Actually any good version of itoa()
should be substituted for this version. The defunct account shows up as
it's user id as there is no way to determine the user name.
Kirk Smith
Purdue EE
30a31,32
> char *itoa();
>
352,353c353,356
< (void) printw("| Player : %-8s %5u |", p->pw_name,
< scoresave[game - 1].entry[i].score);
---
> (void) printw("| Player : %-8s %5u |",
> p ? p->pw_name :
> itoa(scoresave[game - 1].entry[i].uid),
> scoresave[game - 1].entry[i].score);
822a826,857
> char itoabuf[12];
> char *
> itoa (val)
> {
> register char *p;
> register int j,
> mflag;
>
> mflag = 1;
> for (j = 0; j < 11; j++)
> itoabuf[j] = ' ';
> p = itoabuf + 6;
> *(p+1) = '\0';
> if (val == 0)
> {
> *p = '0';
> p--;
> }
> if (val < 0)
> {
> mflag = -1;
> val *= -1;
> }
> while (val != 0)
> {
> *p-- = val % 10 + 060;
> val /= 10;
> }
> if (mflag == -1)
> *p-- = '-';
> return (++p);
> }
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads