mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 02:48:37 +08:00
Fix handling of signed decimal values
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@103 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
66cabfeebb
commit
9ce040cfc6
1 changed files with 3 additions and 3 deletions
|
@ -457,7 +457,7 @@ static void fixup(ubyte fmt, ubyte *flags, int *n)
|
|||
case 'i':
|
||||
/* Signed base 10 */
|
||||
|
||||
if (n < 0)
|
||||
if (*n < 0)
|
||||
{
|
||||
SET_NEGATE(*flags);
|
||||
CLR_SHOWPLUS(*flags);
|
||||
|
@ -1353,7 +1353,7 @@ int lib_vsprintf(struct lib_stream_s *obj, const char *src, va_list ap)
|
|||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||
int luwidth;
|
||||
#endif
|
||||
/* Extract the long long value. */
|
||||
/* Extract the long value. */
|
||||
|
||||
ln = va_arg(ap, long);
|
||||
|
||||
|
@ -1392,7 +1392,7 @@ int lib_vsprintf(struct lib_stream_s *obj, const char *src, va_list ap)
|
|||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||
int pwidth;
|
||||
#endif
|
||||
/* Extract the long long value. */
|
||||
/* Extract the integer value. */
|
||||
|
||||
p = va_arg(ap, void *);
|
||||
|
||||
|
|
Loading…
Reference in a new issue