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

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_20.3.x@14019 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
cinsights 2021-01-16 03:24:39 +00:00
parent d96c2af163
commit 1a5af81551
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 @@
*****************************************************************************
*** 20.3.3 ***
- FIX: Fixed chsnprintf() sign mode/filler mode conflict (bug #1140)
- NEW: RT, NIL: Renamed _THREADS_QUEUE_DECL to THREADS_QUEUE_DECL for
consistency.
- FIX: Fixed GCC 10 causes warning in factory module (bug #1139).