git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed copyright
[swftools.git]
/
lib
/
bitio.c
diff --git
a/lib/bitio.c
b/lib/bitio.c
index
19c662d
..
bd54935
100644
(file)
--- a/
lib/bitio.c
+++ b/
lib/bitio.c
@@
-678,6
+678,10
@@
U32 reader_readU32(reader_t*r)
}
float reader_readFloat(reader_t*r)
{
}
float reader_readFloat(reader_t*r)
{
+ float f;
+ r->read(r, &f, 4);
+ return f;
+
U8 b1=0,b2=0,b3=0,b4=0;
r->read(r, &b1, 1);
r->read(r, &b2, 1);
U8 b1=0,b2=0,b3=0,b4=0;
r->read(r, &b1, 1);
r->read(r, &b2, 1);
@@
-743,7
+747,10
@@
void writer_writeU32(writer_t*w, unsigned long v)
}
void writer_writeFloat(writer_t*w, float f)
{
}
void writer_writeFloat(writer_t*w, float f)
{
- unsigned long v = *(unsigned long*)&f;
+ w->write(w, &f, 4);
+ return;
+
+ unsigned v = *(unsigned*)&f;
unsigned char b1 = v;
unsigned char b2 = v>>8;
unsigned char b3 = v>>16;
unsigned char b1 = v;
unsigned char b2 = v>>8;
unsigned char b3 = v>>16;