]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mstream.cpp
handle 0 timeout in RunLoop() correctly
[wxWidgets.git] / src / common / mstream.cpp
index b9fef96e8c7d250075b920d51451fef72cafb407..cd8ec4ecb85c1ce66fda157619e6e0f4e999c11f 100644 (file)
@@ -97,6 +97,11 @@ wxMemoryInputStream::InitFromStream(wxInputStream& stream, wxFileOffset lenFile)
     m_length = stream.LastRead();
 }
 
+bool wxMemoryInputStream::CanRead() const
+{
+    return m_i_streambuf->GetIntPosition() != m_length;
+}
+
 wxMemoryInputStream::~wxMemoryInputStream()
 {
     delete m_i_streambuf;