ShaderCacheManager read fix

This commit is contained in:
Jack Andersen 2017-02-02 20:22:54 -10:00
parent b4dac198ac
commit 1bfef7ddf8
1 changed files with 2 additions and 0 deletions

View File

@ -241,6 +241,8 @@ ShaderCachedData ShaderCacheManager::lookupData(const Hash& hash)
m_datFr.readUBytesToBuf(compDat, z.avail_in); m_datFr.readUBytesToBuf(compDat, z.avail_in);
z.next_in = compDat; z.next_in = compDat;
int ret = inflate(&z, Z_NO_FLUSH); int ret = inflate(&z, Z_NO_FLUSH);
if (ret == Z_STREAM_END)
break;
if (ret != Z_OK) if (ret != Z_OK)
{ {
inflateEnd(&z); inflateEnd(&z);