]> git.draconx.ca Git - upkg.git/blobdiff - src/libupkg.c
upkg: Print class name in listings.
[upkg.git] / src / libupkg.c
index 680faac96f7f4b7aefd39eab0ada0e7c4f4b46d5..178e235f4ef29b9c31038a3ad184adc259c4d8ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  upkg: tool for manipulating Unreal Tournament packages.
- *  Copyright (C) 2009 Nick Bowler
+ *  Copyright © 2009-2011 Nick Bowler
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ struct upkg_name {
 struct upkg_export_priv {
        struct upkg_export pub;
 
-       long package, class, super;
+       long class, super;
        unsigned long size, offset;
 };
 
@@ -301,7 +301,7 @@ static int pkg_init_exports(struct upkg_priv *pkg)
                len += rc;
 
                if (nbuf-len < 4) goto err;
-               export->package = unpack_s32_le(buf+len);
+               export->pub.package = unpack_s32_le(buf+len);
                len += 4;
 
                rc = upkg_decode_index(&tmp, buf+len, nbuf-len);
@@ -504,8 +504,9 @@ long upkg_export_find(struct upkg *pub, long parent, const char *name)
                struct upkg_export_priv *e = &pkg->exports[i];
 
                /* Assertion: an object's package is an export. */
-               format_assert(e->package >= 0, continue);
-               if (e->package == package && strcmp(e->pub.name, name) == 0) {
+               format_assert(e->pub.package >= 0, continue);
+               if (e->pub.package == package
+                   && strcmp(e->pub.name, name) == 0) {
                        return i;
                }
        }