diff options
| author | megazig <megazig@megazig-desktop.(none)> | 2009-03-13 23:58:46 -0500 |
|---|---|---|
| committer | megazig <megazig@megazig-desktop.(none)> | 2009-03-13 23:58:46 -0500 |
| commit | 58995e8cb526995814b86a75a063e0791fa54e86 (patch) | |
| tree | 15447f8bdf3003dde0ca141d152f7ae6fd49816b /brlyt.c | |
| parent | 9c91cb80cd9ed66a6a3071c4b747a12e26427e98 (diff) | |
data type error
Diffstat (limited to '')
| -rw-r--r-- | brlyt.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -141,9 +141,11 @@ char* getMaterial(int offset) if (offset > 1) { - int n; - for (n=0; n<offset-1;n++) + int n = 1; + for (n; n<offset;n++) + { foo = foo + strlen(foo) + 1; + } } return foo; @@ -485,7 +487,8 @@ void PrintBRLYTEntry_mat1(brlyt_entry entry, u8* brlyt_file) printf(" texoffs: %08x\n", be16(data4.tex_offs)); printf(" wrap_s: %08x\n", data4.wrap_s); printf(" wrap_t: %08x\n", data4.wrap_t); - printf(" name: %s\n", getMaterial(be32(data4.tex_offs))); + int tplOffset = be16(data4.tex_offs); + printf(" name: %s\n", getMaterial(tplOffset)); } // # 0x14 * flags[24-27], followed by |
