curses library fix: getstr()
utzoo!decvax!pur-ee!purdue!pur-phy!crl
utzoo!decvax!pur-ee!purdue!pur-phy!crl
Thu Feb 25 14:17:06 AEST 1982
We have found and fixed a bug in the wgetstr() routine of curses. A
semicolon between a 'while' and its statement caused a string pointer
to not be incremented as characters were received from wgetch().
Before returning, the routine placed a null at *str, and thus
always returned a null string. Scanw() was also affected by this
bug. Here is the fix:
% diff getstr.c getstr.c.old
12c12
< while ((*str = wgetch(win)) != ERR && *str != '\n')
---
> while ((*str = wgetch(win)) != ERR && *str != '\n');
C. LaBrec
pur-ee!physics:crl
More information about the Comp.unix.wizards
mailing list