@@ -216,12 +216,12 @@ objc_autoreleasePoolPop(pool); return j; } -- (void)lowlevelWriteBuffer: (const void *)buffer_ - length: (size_t)length +- (size_t)lowlevelWriteBuffer: (const void *)buffer_ + length: (size_t)length { const char *buffer = buffer_; char16_t *tmp; size_t i = 0, j = 0; @@ -345,7 +345,14 @@ bytesWritten: bytesWritten * 2 errNo: 0]; } @finally { [self freeMemory: tmp]; } + + /* + * We do not count in bytes when writing to the Win32 console. But + * since any incomplete write is an exception here anyway, we can just + * return length. + */ + return length; } @end