[CRT]
[reactos.git] / reactos / lib / sdk / crt / printf / streamout.c
index ccc56de..f427c84 100644 (file)
@@ -227,11 +227,10 @@ static
 int
 streamout_char(FILE *stream, int chr)
 {
-#ifdef _LIBCNT_
-     if ((stream->_flag & _IOSTRG) && (!stream->_ptr))
+#if !defined(_USER32_WSPRINTF)
+     if ((stream->_flag & _IOSTRG) && (stream->_base == NULL))
         return 1;
-#endif 
+#endif
 #if defined(_USER32_WSPRINTF) || defined(_LIBCNT_)
     /* Check if the buffer is full */
     if (stream->_cnt < sizeof(TCHAR))
@@ -254,6 +253,11 @@ streamout_astring(FILE *stream, const char *string, size_t count)
     TCHAR chr;
     int written = 0;
 
+#if !defined(_USER32_WSPRINTF)
+     if ((stream->_flag & _IOSTRG) && (stream->_base == NULL))
+        return count;
+#endif
+
     while (count--)
     {
 #ifdef _UNICODE
@@ -277,6 +281,11 @@ streamout_wstring(FILE *stream, const wchar_t *string, size_t count)
     wchar_t chr;
     int written = 0;
 
+#if defined(_UNICODE) && !defined(_USER32_WSPRINTF)
+     if ((stream->_flag & _IOSTRG) && (stream->_base == NULL))
+        return count;
+#endif
+
     while (count--)
     {
 #ifndef _UNICODE