summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
@@ -44,4 +44,11 @@ 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);
@@ -112,3 +119,3 @@ main(int argc, char *argv[])
- 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]);