summaryrefslogtreecommitdiff
path: root/utils/jz4740_tools/HXFmerge.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/jz4740_tools/HXFmerge.c')
-rw-r--r--utils/jz4740_tools/HXFmerge.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/utils/jz4740_tools/HXFmerge.c b/utils/jz4740_tools/HXFmerge.c
index fb5a0bf2f3..6b6c62505e 100644
--- a/utils/jz4740_tools/HXFmerge.c
+++ b/utils/jz4740_tools/HXFmerge.c
@@ -143,12 +143,12 @@ static void merge_hxf(const char* indir, FILE* outfile, const char* add)
143 unsigned int filesize; 143 unsigned int filesize;
144 strcpy(file, dir); 144 strcpy(file, dir);
145 strcat(file, dirs->d_name); 145 strcat(file, dirs->d_name);
146 if((filehandle = fopen(file, "rb")) == NULL) 146 if((filehandle = fopen(file, "rb")) == NULL)
147 { 147 {
148 fprintf(stderr, "[ERR] Cannot open %s\n", file); 148 fprintf(stderr, "[ERR] Cannot open %s\n", file);
149 closedir(indir_handle); 149 closedir(indir_handle);
150 return; 150 return;
151 } 151 }
152 filesize = _filesize(filehandle); 152 filesize = _filesize(filehandle);
153 if(filesize > 0) 153 if(filesize > 0)
154 { 154 {
@@ -179,7 +179,7 @@ static void merge_hxf(const char* indir, FILE* outfile, const char* add)
179 WRITE(int2le(strlen(dirs->d_name)+strlen(add)), 4); 179 WRITE(int2le(strlen(dirs->d_name)+strlen(add)), 4);
180#endif 180#endif
181#ifndef _WIN32 181#ifndef _WIN32
182 WRITE(replace(&add), strlen(add)-1); 182 WRITE(replace((char*)add), strlen(add)-1);
183#else 183#else
184 WRITE(add, strlen(add)-1); 184 WRITE(add, strlen(add)-1);
185#endif 185#endif
@@ -276,20 +276,20 @@ int main(int argc, char *argv[])
276#ifdef _WIN32 276#ifdef _WIN32
277 if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "\\") != 0) 277 if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "\\") != 0)
278 { 278 {
279 fprintf(stderr, "[ERR] Input path must end with a \\\n"); 279 fprintf(stderr, "[ERR] Input path must end with a \\\n");
280#else 280#else
281 if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "/") != 0) 281 if(strcmp((char*)(argv[1]+strlen(argv[1])-1), "/") != 0)
282 { 282 {
283 fprintf(stderr, "[ERR] Input path must end with a /\n"); 283 fprintf(stderr, "[ERR] Input path must end with a /\n");
284#endif 284#endif
285 return 2; 285 return 2;
286 } 286 }
287 287
288 if((outfile = fopen(argv[2], "wb+")) == NULL) 288 if((outfile = fopen(argv[2], "wb+")) == NULL)
289 { 289 {
290 fprintf(stderr, "[ERR] Cannot open %s\n", argv[2]); 290 fprintf(stderr, "[ERR] Cannot open %s\n", argv[2]);
291 return 3; 291 return 3;
292 } 292 }
293 293
294 fseek(outfile, 0x40, SEEK_SET); 294 fseek(outfile, 0x40, SEEK_SET);
295 295