history fix

Submitted by:	ache (forwarded to Christos Zoulas where fix was agreed to)
This commit is contained in:
David E. O'Brien 2000-05-02 20:00:07 +00:00
parent 959f4c6c47
commit 078e45bc3d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/tcsh/dist/; revision=59901

View File

@ -222,7 +222,7 @@ tprintf(what, buf, fmt, siz, str, tim, info)
fmthist('R', info, (char *) (cz = cbuff), sizeof(cbuff));
else
cz = (unsigned char *) str;
if (str != NULL)
if (cz != NULL)
for (; *cz; *p++ = attributes | *cz++)
if (p >= ep) break;
break;
@ -477,7 +477,7 @@ tprintf(what, buf, fmt, siz, str, tim, info)
case 'w':
if (p >= ep - 5) break;
for (cz = (unsigned char *) month_list[t->tm_mon]; *cz;
*p++ = attributes | *cz++);
*p++ = attributes | *cz++)
if (p >= ep) break;
break;
case 'W':