diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-09-04 00:35:34 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-09-04 00:38:59 +0200 |
commit | ec1df58464ee74084ca675b190e8b0c652262d76 (patch) | |
tree | d02265f61e40326cfb41fa00fd7761cc959e86d7 /crawl-ref/source/package.cc | |
parent | f3a8af65ae975bb4acb4536e21c45578c497116e (diff) | |
download | crawl-ref-ec1df58464ee74084ca675b190e8b0c652262d76.tar.gz crawl-ref-ec1df58464ee74084ca675b190e8b0c652262d76.zip |
Allow reads of 0 bytes, they do happen.
Diffstat (limited to 'crawl-ref/source/package.cc')
-rw-r--r-- | crawl-ref/source/package.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/package.cc b/crawl-ref/source/package.cc index f9471f26fd..d3a2f44c5f 100644 --- a/crawl-ref/source/package.cc +++ b/crawl-ref/source/package.cc @@ -719,7 +719,8 @@ len_t chunk_reader::read(void *data, len_t len) return 0; #ifdef USE_ZLIB - ASSERT(len > 0); + if (!len) + return 0; if (eof) return 0; |