X-Git-Url: http://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/a0efa108741b6cb53ddc3b1228a91b2e0c75a56a..e3726c0480d74840dd9104850cba0f3e5f93beed:/src/engine/texture.gob diff --git a/src/engine/texture.gob b/src/engine/texture.gob index 3db176e..8059c3a 100644 --- a/src/engine/texture.gob +++ b/src/engine/texture.gob @@ -84,8 +84,10 @@ struct engine_texture_data *decode_mipmap(UObject *uo) /* At this point, the current file offset should match the one recorded * above. */ - if (uo->pkg->version >= 63 && end_offset != (f->base + f->offset)) + if (uo->pkg->version >= 63 && end_offset != (f->base + f->offset)) { + u_err(uo, "mipmap end offset does not match data size"); goto err_free; + } /* Read in the remaining fields */ buflen = upkg_export_read(f, buf, 10); @@ -136,6 +138,8 @@ class Engine:Texture from U:Object (dynamic) for (int i = 0; i < self->_priv->mipmap_count; i++) { data[i] = decode_mipmap(uo); if (!data[i]) { + u_err(uo, "error decoding mipmap level %d", i); + /* Unwind the allocations. */ for (; i >= 0; i--) free(data[i]);