Fix bug 1140 - chsnprintf() sign mode/filler mode conflict

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14018 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
cinsights 2021-01-16 03:23:48 +00:00
parent 3f47670d69
commit 78df665ca0
2 changed files with 2 additions and 1 deletions

View File

@ -315,7 +315,7 @@ unsigned_common:
width = -width;
}
if (width < 0) {
if (*s == '-' && filler == '0') {
if ((*s == '-' || *s == '+') && filler == '0') {
streamPut(chp, (uint8_t)*s++);
n++;
i--;

View File

@ -74,6 +74,7 @@
*****************************************************************************
*** Next ***
- FIX: Fixed chsnprintf() sign mode/filler mode conflict (bug #1140)
- NEW: Added time conversion macros and functions for monotonic time stamps
- NEW: Added support for STM32WB55.
- NEW: Added chscanf() and buffered streams, contributed by Alex Lewontin.