From 480c23c05db5698d10c80a9e3087d3385040c596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Bolvansk=C3=BD?= Date: Fri, 19 Aug 2022 23:58:35 +0200 Subject: [PATCH] metal: escape spaces in include path with backslash --- src/ext_metal.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ext_metal.m b/src/ext_metal.m index 7cdbdf0d4..c7daa57ba 100644 --- a/src/ext_metal.m +++ b/src/ext_metal.m @@ -197,6 +197,8 @@ static int hc_mtlBuildOptionsToDict (void *hashcat_ctx, const char *build_option { NSString *path_key = @"INCLUDE_PATH"; NSString *path_value = [NSString stringWithCString: include_path encoding: NSUTF8StringEncoding]; + // Include path may contain spaces, escape them with a backslash + path_value = [path_value stringByReplacingOccurrencesOfString:@" " withString:@"\\ "]; [build_options_dict setObject:path_value forKey:path_key]; }