__pformat_wputchars() for snprintf, __pformat_puchats() for swprintf and
__pformat_puchats() for snprintf prints all characters including nul chars.
So change __pformat_wputchars() for swprintf to align this behavior.
This change is needed for swprintf(%wZ) support in follow up change.
---
mingw-w64-crt/stdio/mingw_pformat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/stdio/mingw_pformat.c
b/mingw-w64-crt/stdio/mingw_pformat.c
index 0af793ba9824..bdc7eba2a573 100644
--- a/mingw-w64-crt/stdio/mingw_pformat.c
+++ b/mingw-w64-crt/stdio/mingw_pformat.c
@@ -680,7 +680,7 @@ void __pformat_wputchars( const wchar_t *s, int count,
__pformat_t *stream )
__pformat_putc( '\x20', stream );
len = count;
- while(len-- > 0 && *s != 0)
+ while(len-- > 0)
{
__pformat_putc(*s++, stream);
}
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public