return;
}
- if (!GetDataLeft() && !FlushBuffer()) {
- CHECK_ERROR(wxStream_READ_ERR);
+ if (GetDataLeft() == 0 && !FlushBuffer()) {
+ CHECK_ERROR(wxStream_WRITE_ERR);
return;
}
{
wxASSERT(m_stream != NULL);
+ if (m_mode == write)
+ return 0;
+
// ------------------
// Buffering disabled
// ------------------
char buf[BUF_TEMP_SIZE];
size_t s = 0, bytes_read = BUF_TEMP_SIZE;
+ if (m_mode == write)
+ return 0;
+
while (bytes_read == BUF_TEMP_SIZE) {
bytes_read = Read(buf, bytes_read);
bytes_read = s_buf->Write(buf, bytes_read);
{
wxASSERT(m_stream != NULL);
+ if (m_mode == read)
+ return 0;
+
// ------------------
// Buffering disabled
// ------------------
char buf[BUF_TEMP_SIZE];
size_t s = 0, bytes_count = BUF_TEMP_SIZE, b_count2;
+ if (m_mode == read)
+ return 0;
+
while (bytes_count == BUF_TEMP_SIZE) {
b_count2 = sbuf->Read(buf, bytes_count);
bytes_count = Write(buf, b_count2);