diff --git a/reactos/lib/crtdll/stdio/vfprintf.c b/reactos/lib/crtdll/stdio/vfprintf.c index a352918639b..394cd742657 100644 --- a/reactos/lib/crtdll/stdio/vfprintf.c +++ b/reactos/lib/crtdll/stdio/vfprintf.c @@ -693,23 +693,22 @@ int __vfprintf(FILE *f, const char *fmt, va_list args) } continue; -#if 0 case 'Z': if (qualifier == 'w') { /* print counted unicode string */ PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); - if ((pus == NULL) || (pus->Buffer)) { + if ((pus == NULL) || (pus->Buffer == NULL)) { s = ""; while ((*s) != 0) putc(*s++, f); } else { - for (i = 0; pus->Buffer[i] && i < pus->Length; i++) + for (i = 0; pus->Buffer[i] && i < pus->Length / sizeof(WCHAR); i++) putc((unsigned char)(pus->Buffer[i]), f); } } else { /* print counted ascii string */ PANSI_STRING pus = va_arg(args, PANSI_STRING); - if ((pus == NULL) || (pus->Buffer)) { + if ((pus == NULL) || (pus->Buffer == NULL)) { s = ""; while ((*s) != 0) putc(*s++, f); @@ -719,7 +718,6 @@ int __vfprintf(FILE *f, const char *fmt, va_list args) } } continue; -#endif case 'e': case 'E': diff --git a/reactos/lib/msvcrt/stdio/vfprintf.c b/reactos/lib/msvcrt/stdio/vfprintf.c index 7dbe0b89f90..fd5bc9c5891 100644 --- a/reactos/lib/msvcrt/stdio/vfprintf.c +++ b/reactos/lib/msvcrt/stdio/vfprintf.c @@ -694,23 +694,22 @@ int __vfprintf(FILE *f, const char *fmt, va_list args) } continue; -#if 0 case 'Z': if (qualifier == 'w') { /* print counted unicode string */ PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); - if ((pus == NULL) || (pus->Buffer)) { + if ((pus == NULL) || (pus->Buffer == NULL)) { s = ""; while ((*s) != 0) putc(*s++, f); } else { - for (i = 0; pus->Buffer[i] && i < pus->Length; i++) + for (i = 0; pus->Buffer[i] && i < pus->Length / sizeof(WCHAR); i++) putc((unsigned char)(pus->Buffer[i]), f); } } else { /* print counted ascii string */ PANSI_STRING pus = va_arg(args, PANSI_STRING); - if ((pus == NULL) || (pus->Buffer)) { + if ((pus == NULL) || (pus->Buffer == NULL)) { s = ""; while ((*s) != 0) putc(*s++, f); @@ -720,7 +719,6 @@ int __vfprintf(FILE *f, const char *fmt, va_list args) } } continue; -#endif case 'e': case 'E':