diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-15 00:26:13 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-15 00:26:13 +0200 |
commit | c251d4e8815d64ec73017890c5ee48db867e050b (patch) | |
tree | ff374a066f5b012055ce4c9bda79b774457cedc3 | |
parent | 93bd600a7b1bc4062c29f1c8e961c29317312efb (diff) |
MLKStream#-readChar: Properly reread unread characters.
-rw-r--r-- | MLKStream.m | 9 |
1 files changed, 9 insertions, 0 deletions
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++;) |