Fix a decision bug with trailing stuff in lib.c:is_valid_number
after dec 18 changes. updated FIXES, adjusted version date.
This commit is contained in:
parent
7d1848cfa6
commit
1fd5fa38cc
4
FIXES
4
FIXES
@ -25,6 +25,10 @@ THIS SOFTWARE.
|
||||
This file lists all bug fixes, changes, etc., made since the AWK book
|
||||
was sent to the printers in August, 1987.
|
||||
|
||||
January 06, 2021:
|
||||
Fix a decision bug with trailing stuff in lib.c:is_valid_number
|
||||
after recent changes. Thanks to Ozan Yigit.
|
||||
|
||||
December 18, 2020:
|
||||
Fix problems converting inf and NaN values in lib.c:is_valid_number.
|
||||
Enhance number to string conversion to do the right thing for
|
||||
|
9
lib.c
9
lib.c
@ -822,10 +822,17 @@ convert:
|
||||
if (result != NULL)
|
||||
*result = r;
|
||||
|
||||
retval = (isspace(*ep) || *ep == '\0' || trailing_stuff_ok);
|
||||
/*
|
||||
* check for trailing stuff
|
||||
*/
|
||||
while (isspace(*ep))
|
||||
ep++;
|
||||
|
||||
if (no_trailing != NULL)
|
||||
*no_trailing = (*ep == '\0');
|
||||
|
||||
// return true if found the end, or trailing stuff is allowed
|
||||
retval = *ep == '\0' || trailing_stuff_ok;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user