From c251d4e8815d64ec73017890c5ee48db867e050b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 15 Jun 2008 00:26:13 +0200 Subject: MLKStream#-readChar: Properly reread unread characters. --- MLKStream.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MLKStream.m b/MLKStream.m index 01ed40e..e59dee4 100644 --- a/MLKStream.m +++ b/MLKStream.m @@ -63,6 +63,15 @@ uint8_t *buffer; int i; unichar retval; + + if (_charCached) + { + char ch; + ch = _cachedChar; + _cachedChar = 0; + _charCached = NO; + return ch; + } buffer = NULL; for (i = 0; i++;) -- cgit v1.2.3