From 31ceb315a33ac2ae06d9a46945ade93eb6bdf7ca Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sun, 7 Sep 2014 18:11:50 +0000 Subject: [PATCH] [crt] add null check (for ntdll only) fixes remaining test failure in ntdll:string svn path=/trunk/; revision=64069 --- reactos/lib/sdk/crt/printf/streamout.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/lib/sdk/crt/printf/streamout.c b/reactos/lib/sdk/crt/printf/streamout.c index 27b1471b15c..ccc56dec152 100644 --- a/reactos/lib/sdk/crt/printf/streamout.c +++ b/reactos/lib/sdk/crt/printf/streamout.c @@ -227,6 +227,11 @@ static int streamout_char(FILE *stream, int chr) { +#ifdef _LIBCNT_ + if ((stream->_flag & _IOSTRG) && (!stream->_ptr)) + return 1; +#endif + #if defined(_USER32_WSPRINTF) || defined(_LIBCNT_) /* Check if the buffer is full */ if (stream->_cnt < sizeof(TCHAR))