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 (from parent 1:
14581c9
)
big endian fixes.
author
kramm
<kramm>
Wed, 9 Jan 2002 11:20:13 +0000
(11:20 +0000)
committer
kramm
<kramm>
Wed, 9 Jan 2002 11:20:13 +0000
(11:20 +0000)
src/swfextract.c
patch
|
blob
|
history
diff --git
a/src/swfextract.c
b/src/swfextract.c
index
1e1f204
..
62b6168
100644
(file)
--- a/
src/swfextract.c
+++ b/
src/swfextract.c
@@
-152,9
+152,9
@@
char * tagused;
void idcallback(void*data)
{
void idcallback(void*data)
{
- if(!(used[*(U16*)data]&1)) {
+ if(!(used[SWAP16(*(U16*)data)]&1)) {
changed = 1;
changed = 1;
- used[*(U16*)data] |= 1;
+ used[SWAP16(*(U16*)data)] |= 1;
}
}
}
}
@@
-395,7
+395,7
@@
void handlejpeg(TAG*tag)
{
char name[80];
FILE*fi;
{
char name[80];
FILE*fi;
- sprintf(name, "pic%d.jpeg", *(U16*)tag->data);
+ sprintf(name, "pic%d.jpeg", SWAP16(*(U16*)tag->data));
/* swf jpeg images have two streams, which both start with ff d8 and
end with ff d9. The following code handles sorting the middle
<ff d9 ff d8> bytes out, so that one stream remains */
/* swf jpeg images have two streams, which both start with ff d8 and
end with ff d9. The following code handles sorting the middle
<ff d9 ff d8> bytes out, so that one stream remains */
@@
-417,7
+417,7
@@
void handlejpeg(TAG*tag)
fclose(fi);
}
if(tag->id == ST_DEFINEBITSJPEG3 && tag->len>6) {
fclose(fi);
}
if(tag->id == ST_DEFINEBITSJPEG3 && tag->len>6) {
- U32 end = *(U32*)&tag->data[2]+6;
+ U32 end = SWAP32(*(U32*)&tag->data[2])+6;
int pos = findjpegboundary(&tag->data[6], tag->len-6);
if(pos<0)
return;
int pos = findjpegboundary(&tag->data[6], tag->len-6);
if(pos<0)
return;