From 4f9d0149947cc3625726127e491cc5b8f978c690 Mon Sep 17 00:00:00 2001 From: Zhang Yang Date: Thu, 30 Nov 2023 13:16:10 +0800 Subject: [PATCH] Fix -nan issue with f32 --- libs/libc/stdio/lib_libvsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libc/stdio/lib_libvsprintf.c b/libs/libc/stdio/lib_libvsprintf.c index 9d2ba02b7e..de285527d5 100644 --- a/libs/libc/stdio/lib_libvsprintf.c +++ b/libs/libc/stdio/lib_libvsprintf.c @@ -616,7 +616,7 @@ flt_oper: exp = _dtoa.exp; sign = 0; - if ((_dtoa.flags & DTOA_MINUS) && !(_dtoa.flags & DTOA_NAN)) + if (_dtoa.flags & DTOA_MINUS) { sign = '-'; }