23 lines
759 B
Diff
23 lines
759 B
Diff
From 4967d2254d9d1daf97fd525723c44aa6d2c4b731 Mon Sep 17 00:00:00 2001
|
|
From: Robin Ebert <ebertrobin2002@gmail.com>
|
|
Date: Fri, 5 Nov 2021 22:07:41 +0100
|
|
Subject: [PATCH] Fix bug where the wrong char pointer is used
|
|
|
|
---
|
|
bins/unzzip.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/bins/unzzip.c b/bins/unzzip.c
|
|
index 0c0b5e58..3f63e722 100644
|
|
--- a/bins/unzzip.c
|
|
+++ b/bins/unzzip.c
|
|
@@ -137,7 +137,7 @@ FILE* create_fopen(char* name, char* mode, int subdirs)
|
|
{
|
|
char* p = strrchr(name_stripped, '/');
|
|
if (p) {
|
|
- char* dir_name = _zzip_strndup(name_stripped, p-name);
|
|
+ char* dir_name = _zzip_strndup(name_stripped, p-name_stripped);
|
|
makedirs(dir_name);
|
|
free (dir_name);
|
|
}
|