parent
3158273cea
commit
6c8a02e604
1 changed files with 10 additions and 0 deletions
10
res/bin2h.c
10
res/bin2h.c
|
@ -8,6 +8,8 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
if (argc > 2)
|
||||
{
|
||||
char *last_forward_slash = strrchr(argv[1], '/');
|
||||
|
@ -29,10 +31,12 @@ int main(int argc, char *argv[])
|
|||
if (in_file == NULL)
|
||||
{
|
||||
printf("Couldn't open '%s'\n", argv[1]);
|
||||
result = 1;
|
||||
}
|
||||
else if (out_file == NULL)
|
||||
{
|
||||
printf("Couldn't open '%s'\n", argv[2]);
|
||||
result = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -64,4 +68,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
free(filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue