summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bios_extract.c7
1 files changed, 7 insertions, 0 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",