diff options
Diffstat (limited to 'Source/Library/Common/IStream.proto.cpp')
-rw-r--r-- | Source/Library/Common/IStream.proto.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Library/Common/IStream.proto.cpp b/Source/Library/Common/IStream.proto.cpp index 59c623e..6176eac 100644 --- a/Source/Library/Common/IStream.proto.cpp +++ b/Source/Library/Common/IStream.proto.cpp @@ -51,7 +51,10 @@ WChar IStream::getChar() { String IStream::get(WChar delimiter) { waitLock(); //calculate length of string to read - if (m_buffer == 0) populate(); + if (m_buffer == 0) { + unlock(); + if (!populate()) return ""; + } int length = 0, ptr = m_ptr; for (SimpleList<String> *iter = m_buffer; iter != 0;) { if (iter->v()[ptr] == delimiter) break; |