Fixed usage of va_arg().

This commit is contained in:
Thomas Doerfler
2009-12-01 10:12:55 +00:00
parent 6f70c07057
commit 0b0485ae7f
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2009-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/src/vprintk.c: Fixed usage of va_arg().
2009-11-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/login_prompt.c: Fix problem where timeout on login

View File

@@ -80,7 +80,8 @@ void vprintk(
c = *++fmt;
}
if ( c == 'c' ) {
char chr = va_arg(ap, char);
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}