summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-05-06 11:54:31 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2019-05-07 17:05:32 +0200
commit7da620c7ce4db9b482010a07673527d0a7ee430b (patch)
tree219ccc66caed66fd25d229940989ecf2697b8121 /fuzz
parente3790ad2a35df12666ac1fde10746253e4a9fc74 (diff)
downloadwget-7da620c7ce4db9b482010a07673527d0a7ee430b.tar.gz
* fuzz/main.c: Fix paths for WIN32
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fuzz/main.c b/fuzz/main.c
index b071cfd2..d6723e14 100644
--- a/fuzz/main.c
+++ b/fuzz/main.c
@@ -88,10 +88,12 @@ int main(int argc, char **argv)
return system(cmd) != 0;
}
- if ((target = strrchr(argv[0], SLASH)))
- target = strrchr(target, '/');
- else
+ if ((target = strrchr(argv[0], SLASH))) {
+ if (strrchr(target, '/'))
+ target = strrchr(target, '/');
+ } else
target = strrchr(argv[0], '/');
+
target = target ? target + 1 : argv[0];
if (strncmp(target, "lt-", 3) == 0)