This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6d3f14d41d2527843007dff8bca4fad4cea8fbb1 Author: anjiahao <[email protected]> AuthorDate: Mon Dec 6 17:56:39 2021 +0800 libc/strptime:_conv_num skip space Signed-off-by: anjiahao <[email protected]> --- libs/libc/time/lib_strptime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/libc/time/lib_strptime.c b/libs/libc/time/lib_strptime.c index 43b3df7c5a..7e4d8828e8 100644 --- a/libs/libc/time/lib_strptime.c +++ b/libs/libc/time/lib_strptime.c @@ -413,6 +413,9 @@ _conv_num(const unsigned char **buf, int *dest, int llim, int ulim) int result = 0; int rulim = ulim; + while (ispace(**buf)) + *buf++; + if (**buf < '0' || **buf > '9') return (0);
