summaryrefslogtreecommitdiff
path: root/nuttx/lib
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-19 21:42:32 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-19 21:42:32 +0000
commit0033159884c130fad47f54ad273d4bdeb74df1d2 (patch)
tree315f91d202734276a7e8e6f96e556377c0bbcf8a /nuttx/lib
parent475347bfb89b186f6ef0e60778f12379f32c1623 (diff)
downloadpx4-nuttx-0033159884c130fad47f54ad273d4bdeb74df1d2.tar.gz
px4-nuttx-0033159884c130fad47f54ad273d4bdeb74df1d2.tar.bz2
px4-nuttx-0033159884c130fad47f54ad273d4bdeb74df1d2.zip
Fix handling of signed decimal values
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@103 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r--nuttx/lib/lib_libvsprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/lib/lib_libvsprintf.c b/nuttx/lib/lib_libvsprintf.c
index c4b34e7b6..65b75e134 100644
--- a/nuttx/lib/lib_libvsprintf.c
+++ b/nuttx/lib/lib_libvsprintf.c
@@ -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 *);