Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP Path: utzoo!linus!philabs!seismo!harpo!eagle!mhuxl!ihnp4!fortune!olson From: olson@fortune.UUCP Newsgroups: net.sources Subject: a bug in the recently posted curses - (nf) Message-ID: <2108@fortune.UUCP> Date: Tue, 27-Dec-83 15:06:11 EST Article-I.D.: fortune.2108 Posted: Tue Dec 27 15:06:11 1983 Date-Received: Thu, 29-Dec-83 01:15:39 EST Sender: notes@fortune.UUCP Organization: Fortune Systems, Redwood City, CA Lines: 28 #N:fortune:10100009:000:1012 fortune!olson Dec 27 11:38:00 1983 We discovered a bug in the 'new' libcurses distributed by Ken Arnold several months ago. It seems that several of the files included have either earlier version #'s, or the same version #'s, but earlier dates. The only case we have verified as causing a bug so far is in getstr.c. The newly distributed version was 1.3, while the one we have in our sources from Berkeley is 1.4, with a later date. The bug is on the 'while' line. The line ends with a ';', there should be none. As a result, the pointer is never incremented. (Since the new curses was posted to this group, I thought it better to post this article here, rather than to net.bugs.4bsd.) The diff listing follows: ------------------ 6c6 < * 4/29/81 (Berkeley) @(#)getstr.c 1.3 --- > * 7/2/81 (Berkeley) @(#)getstr.c 1.4 12c12 < while ((*str = wgetch(win)) != ERR && *str != '\n'); --- > while ((*str = wgetch(win)) != ERR && *str != '\n') ------------------ Dave Olson, Fortune Systems {ihnp4,harpo,ucbvax!amd70}!fortune!olson