summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bios_extract.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bios_extract.c b/bios_extract.c
index 4075b96..0bd4dd9 100644
--- a/bios_extract.c
+++ b/bios_extract.c
@@ -42,8 +42,15 @@ unsigned char *
MMapOutputFile(char *filename, int size)
{
unsigned char* Buffer;
+ char *tmp;
int fd;
+ /* all slash signs '/' in filenames will be replaced by a
+ backslash sign '\' */
+ tmp = filename;
+ while ((tmp = strchr(tmp, '/')) != NULL)
+ tmp[0] = '\\';
+
fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (fd < 0) {
fprintf(stderr, "Error: unable to open %s: %s\n\n",
@@ -110,7 +117,7 @@ main(int argc, char *argv[])
int i, len;
unsigned char *tmp;
- if ((argc != 2) || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
+ if ((argc != 2) || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
HelpPrint(argv[0]);
return 1;
}