Author: dgorbachev
Date: Sat Jul 25 09:40:35 2009
New Revision: 42189
URL:
http://svn.reactos.org/svn/reactos?rev=42189&view=rev
Log:
Do not fail with 'l' type modifier. Bug #4438.
Modified:
trunk/reactos/boot/freeldr/freeldr/ui/tui.c
Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/tu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] Sat Jul 25 09:40:35 2009
@@ -41,25 +41,11 @@
{
switch (c = *(format++))
{
- case 'd': case 'u': case 'x':
- if (c == 'x')
- _itoa(va_arg(ap, unsigned long), str, 16);
- else
- _itoa(va_arg(ap, unsigned long), str, 10);
-
- ptr = str;
-
- while (*ptr)
- {
- MachConsPutChar(*(ptr++));
- }
+ case 'c':
+ MachConsPutChar((va_arg(ap, int)) & 0xff);
break;
-
- case 'c': MachConsPutChar((va_arg(ap,int))&0xff); break;
-
case 's':
- ptr = va_arg(ap,char *);
-
+ ptr = va_arg(ap, char *);
while ((c = *(ptr++)))
{
MachConsPutChar(c);
@@ -68,6 +54,20 @@
case '%':
MachConsPutChar(c);
break;
+ case 'l':
+ c = *(format++);
+ /* Fall through. */
+ case 'd': case 'u': case 'x':
+ if (c == 'x')
+ _itoa(va_arg(ap, unsigned long), str, 16);
+ else
+ _itoa(va_arg(ap, unsigned long), str, 10);
+ ptr = str;
+ while (*ptr)
+ {
+ MachConsPutChar(*(ptr++));
+ }
+ break;
default:
printf("\nprintf() invalid format specifier - %%%c\n", c);
break;
@@ -76,7 +76,6 @@
}
va_end(ap);
-
return 0;
}