summaryrefslogtreecommitdiff
path: root/tools/scramble.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/scramble.c')
-rw-r--r--tools/scramble.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/scramble.c b/tools/scramble.c
index ecb198b0f4..9d0a8d415a 100644
--- a/tools/scramble.c
+++ b/tools/scramble.c
@@ -19,7 +19,7 @@
19 19
20#include <stdio.h> 20#include <stdio.h>
21#include <stdlib.h> 21#include <stdlib.h>
22 22#include <string.h>
23#include "iriver.h" 23#include "iriver.h"
24 24
25enum 25enum
@@ -81,9 +81,9 @@ int main (int argc, char** argv)
81 unsigned short crc=0; 81 unsigned short crc=0;
82 unsigned long chksum=0; /* 32 bit checksum */ 82 unsigned long chksum=0; /* 32 bit checksum */
83 unsigned char header[24]; 83 unsigned char header[24];
84 unsigned char *iname = argv[1]; 84 char *iname = argv[1];
85 unsigned char *oname = argv[2]; 85 char *oname = argv[2];
86 unsigned char *xorstring; 86 char *xorstring;
87 int headerlen = 6; 87 int headerlen = 6;
88 FILE* file; 88 FILE* file;
89 int version; 89 int version;
@@ -320,7 +320,7 @@ int main (int argc, char** argv)
320#define MY_FIRMWARE_TYPE "Rockbox" 320#define MY_FIRMWARE_TYPE "Rockbox"
321#define MY_HEADER_VERSION 1 321#define MY_HEADER_VERSION 1
322 default: 322 default:
323 strncpy(header,MY_FIRMWARE_TYPE,9); 323 strncpy((char *)header, MY_FIRMWARE_TYPE,9);
324 header[9]='\0'; /*shouldn't have to, but to be SURE */ 324 header[9]='\0'; /*shouldn't have to, but to be SURE */
325 header[10]=MY_HEADER_VERSION&0xFF; 325 header[10]=MY_HEADER_VERSION&0xFF;
326 header[11]=(crc>>8)&0xFF; 326 header[11]=(crc>>8)&0xFF;