Sunny
9856eae61f
libc/libvsprintf: fix vsnprintf bug with "%e"
...
For "%e" conversion, the exponent always contains at least two digits.
That means if the value is zero, the exponent is 00, not 0.
Such as code:
printf(buffer, sizeof(buffer), "%e", 1.232323232323);
printf(buffer, sizeof(buffer), "%e", 12.32323232323);
printf(buffer, sizeof(buffer), "%e", 123.2323232323);
Expected output:
1.232323e+00
1.232323e+01
1.232323e+02
But real output:
1.232323e+0
1.232323e+1
1.232323e+2
Signed-off-by: Sunny <zxcvbnm37425@gmail.com>
2023-07-09 01:50:41 +08:00
..
2023-07-08 13:50:48 +08:00
2023-02-24 00:35:19 +08:00
2023-02-01 23:47:44 +08:00
2021-04-12 22:58:23 -04:00
2023-05-17 10:24:42 +08:00
2022-12-22 20:16:11 +08:00
2021-11-18 10:06:27 -05:00
2021-11-27 16:07:39 -03:00
2023-05-27 15:05:44 +08:00
2022-03-02 15:55:38 +08:00
2022-10-18 23:29:55 +08:00
2021-11-18 10:06:27 -05:00
2021-11-18 10:06:27 -05:00
2021-11-18 10:06:27 -05:00
2021-11-18 10:06:27 -05:00
2022-10-22 23:34:45 +08:00
2021-11-18 06:29:09 -08:00
2023-02-24 00:35:19 +08:00
2023-02-24 10:39:48 +08:00
2023-02-24 10:39:48 +08:00
2023-02-24 10:39:48 +08:00
2023-02-01 23:47:44 +08:00
2022-10-22 23:34:45 +08:00
2023-02-24 10:39:48 +08:00
2023-05-30 23:00:00 +08:00
2022-11-09 21:38:10 +01:00
2022-10-22 23:34:45 +08:00
2022-10-22 23:34:45 +08:00
2023-05-30 23:00:00 +08:00
2022-12-22 20:16:11 +08:00
2022-12-05 14:27:55 +01:00
2023-07-09 01:50:41 +08:00
2023-05-21 09:52:08 -03:00
2021-11-18 06:29:09 -08:00
2022-10-22 23:34:45 +08:00
2022-10-22 23:34:45 +08:00
2023-06-29 18:15:06 +08:00
2023-05-08 09:57:01 +02:00
2022-10-22 23:34:45 +08:00
2023-05-01 11:24:41 +03:00
2022-10-22 23:34:45 +08:00
2021-11-19 08:21:27 -03:00
2023-04-19 02:48:39 +08:00
2022-07-20 18:06:29 +03:00
2022-07-20 18:06:29 +03:00
2022-10-14 23:29:38 +08:00
2023-03-28 14:46:07 -03:00
2023-03-01 13:08:59 +09:00
2022-10-22 23:34:45 +08:00
2022-10-22 23:34:45 +08:00
2021-04-02 11:12:25 -05:00
2023-05-01 11:24:41 +03:00