From: Chet Ramey Date: Tue, 4 Sep 2018 20:43:40 +0000 (-0400) Subject: commit bash-20180831 snapshot X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82b4156ab5da52394b7415822ff455b75b5dd21f;p=thirdparty%2Fbash.git commit bash-20180831 snapshot --- diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 236ee9ba0..90501dd73 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -4245,3 +4245,10 @@ execute_cmd.c unfreeze_jobs_list - execute_pipeline: set up lastpipe_cleanup with old value of jobs_list_frozen + + 9/3 + --- +builtins/printf.def + - getuintmax,getfloatmax: on a conversion error, return as much of the + value as we were able to convert instead of 0. Fixes bug reported + by Robert Elz diff --git a/builtins/printf.def b/builtins/printf.def index fc0892918..1f76c25f7 100644 --- a/builtins/printf.def +++ b/builtins/printf.def @@ -1198,8 +1198,10 @@ getuintmax () if (*ep) { sh_invalidnum (garglist->word->word); +#if 0 /* Same POSIX.2 conversion error requirements as getintmax(). */ ret = 0; +#endif conversion_error = 1; } else if (errno == ERANGE) @@ -1227,8 +1229,10 @@ getfloatmax () if (*ep) { sh_invalidnum (garglist->word->word); +#if 0 /* Same thing about POSIX.2 conversion error requirements. */ ret = 0; +#endif conversion_error = 1; } else if (errno == ERANGE) diff --git a/lib/readline/text.c b/lib/readline/text.c index 81de2a99c..15e1a51eb 100644 --- a/lib/readline/text.c +++ b/lib/readline/text.c @@ -297,7 +297,7 @@ _rl_forward_char_internal (int count) #endif if (rl_end < 0) - rl_end = 0; + rl_end = 0; #else point = rl_point + count; if (point > rl_end)