summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/scramble.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/scramble.c b/tools/scramble.c
index 8e3f7395a5..712f8ff728 100644
--- a/tools/scramble.c
+++ b/tools/scramble.c
@@ -187,14 +187,14 @@ int main (int argc, char** argv)
{
int xorlen = strlen(xorstring);
- /* calculate checksum */
- for (i=0; i<slen; i++)
- crc += outbuf[i];
-
/* xor data */
for (i=0; i<slen; i++)
outbuf[i] ^= xorstring[i & (xorlen-1)];
+ /* calculate checksum */
+ for (i=0; i<slen; i++)
+ crc += outbuf[i];
+
header[0] = header[2] = 'Z';
header[1] = header[3] = version;
int2le(length, &header[4]);