|
linus: tools scramble.c,1.14,1.15: msg#00199systems.archos.rockbox.cvs
Update of /cvsroot/rockbox/tools In directory labb:/tmp/cvs-serv24979 Modified Files: scramble.c Log Message: Made the -add option use char instead of short, prevents endianness problems Index: scramble.c =================================================================== RCS file: /cvsroot/rockbox/tools/scramble.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- scramble.c 28 Jan 2005 10:28:34 -0000 1.14 +++ scramble.c 28 Jan 2005 12:20:20 -0000 1.15 @@ -199,10 +199,9 @@ switch (method) { case add: - for (i = 0; i < length/2; i++) { - unsigned short *inbuf16 = (unsigned short *)inbuf; - /* add 16 unsigned bits but keep a 32 bit sum */ - chksum += inbuf16[i]; + for (i = 0; i < length; i++) { + /* add 8 unsigned bits but keep a 32 bit sum */ + chksum += inbuf[i]; } break; case scramble: _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox-cvs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | linus: tools scramble.c,1.13,1.14: 00199, cvs |
|---|---|
| Next by Date: | linus: tools iriver.c,1.1,1.2: 00199, cvs |
| Previous by Thread: | linus: tools scramble.c,1.13,1.14i: 00199, cvs |
| Next by Thread: | linus: tools iriver.c,1.1,1.2: 00199, cvs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |