]> git.draconx.ca Git - upkg.git/blobdiff - src/engine/texture.gob
uobject: Make the relevant UPkg available to objects.
[upkg.git] / src / engine / texture.gob
index 8059c3adb9503bc149b6063a93ac28d108b84873..8e7bb4a54dc5be0fb93009bcf8f6486c7fc188a7 100644 (file)
@@ -52,7 +52,7 @@ struct engine_texture_data *decode_mipmap(UObject *uo)
        long datalen;
 
        buflen = upkg_export_read(f, buf, sizeof buf);
-       if (uo->pkg->version >= 63) {
+       if (f->pkg->version >= 63) {
                /*
                 * There's an offset to the end of the image data here; not
                 * clear why it's useful since it's implied by the very next
@@ -84,7 +84,7 @@ 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 (f->pkg->version >= 63 && end_offset != (f->base + f->offset)) {
                u_err(uo, "mipmap end offset does not match data size");
                goto err_free;
        }