git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41928ec
)
more big endian fixes
author
kramm
<kramm>
Wed, 9 Jan 2002 11:19:14 +0000
(11:19 +0000)
committer
kramm
<kramm>
Wed, 9 Jan 2002 11:19:14 +0000
(11:19 +0000)
src/flash.c
patch
|
blob
|
history
src/reloc.c
patch
|
blob
|
history
diff --git
a/src/flash.c
b/src/flash.c
index
627b101
..
3d1006c
100644
(file)
--- a/
src/flash.c
+++ b/
src/flash.c
@@
-514,14
+514,14
@@
int getidfromtag(struct swf_tag* tag)
}
break;
case TAGID_REMOVEOBJECT:
}
break;
case TAGID_REMOVEOBJECT:
- return *(u16*)tag->data;
+ return SWAP16(*(u16*)tag->data);
break;
case TAGID_REMOVEOBJECT2:
return -1;
break;
}
break;
case TAGID_REMOVEOBJECT2:
return -1;
break;
}
- return *(u16*)tag->data;
+ return SWAP16(*(u16*)tag->data);
}
void setidintag(struct swf_tag* tag, int id)
}
void setidintag(struct swf_tag* tag, int id)
diff --git
a/src/reloc.c
b/src/reloc.c
index
e239675
..
294570e
100644
(file)
--- a/
src/reloc.c
+++ b/
src/reloc.c
@@
-19,10
+19,10
@@
void maponeid(void*idpos)
{
u16*idptr = (u16*)idpos;
if(slaveids[SWAP16(*idptr)]<0) {
{
u16*idptr = (u16*)idpos;
if(slaveids[SWAP16(*idptr)]<0) {
- logf("<error> Trying to map id never encountered before: id=%d", *idptr);
+ logf("<error> Trying to map id never encountered before: id=%d", SWAP16(*idptr));
return ;
}
return ;
}
- logf("<debug> mapping %d to %d", SWAP16(*idptr), slaveids[*idptr]);
+ logf("<debug> mapping %d to %d", SWAP16(*idptr), slaveids[SWAP16(*idptr)]);
*idptr = SWAP16(slaveids[*idptr]);
}
*idptr = SWAP16(slaveids[*idptr]);
}
@@
-194,7
+194,7
@@
void map_ids_mem(u8*mem, int length, void(*callback)(void*))
u16 charid;
if(!reader_readu8(&reader)) //flags
break;
u16 charid;
if(!reader_readu8(&reader)) //flags
break;
- charid = *(u16*)reader_getinputpos(&reader);
+ charid = SWAP16(*(u16*)reader_getinputpos(&reader));
callback(reader_getinputpos(&reader));
reader_readu16(&reader); //char
reader_readu16(&reader); //layer
callback(reader_getinputpos(&reader));
reader_readu16(&reader); //char
reader_readu16(&reader); //layer