diff --git a/src/SFML/System/Err.cpp b/src/SFML/System/Err.cpp index 52df5246..ec1ff75d 100644 --- a/src/SFML/System/Err.cpp +++ b/src/SFML/System/Err.cpp @@ -67,9 +67,15 @@ private : // Valid character return sputc(static_cast(character)); } + else if (character != EOF) + { + // Not enough space in the buffer: synchronize output and try again + sync(); + return overflow(character); + } else { - // Invalid character, or not enough space in the buffer: synchronize output + // Invalid character: synchronize output return sync(); } }