diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/scramble.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/scramble.c b/tools/scramble.c index 22d9513d4a..3be92d0605 100644 --- a/tools/scramble.c +++ b/tools/scramble.c | |||
@@ -199,10 +199,9 @@ int main (int argc, char** argv) | |||
199 | switch (method) | 199 | switch (method) |
200 | { | 200 | { |
201 | case add: | 201 | case add: |
202 | for (i = 0; i < length/2; i++) { | 202 | for (i = 0; i < length; i++) { |
203 | unsigned short *inbuf16 = (unsigned short *)inbuf; | 203 | /* add 8 unsigned bits but keep a 32 bit sum */ |
204 | /* add 16 unsigned bits but keep a 32 bit sum */ | 204 | chksum += inbuf[i]; |
205 | chksum += inbuf16[i]; | ||
206 | } | 205 | } |
207 | break; | 206 | break; |
208 | case scramble: | 207 | case scramble: |