From 3072a02d5d48bdfcd7c491f4d35a1de0508be3d1 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Fri, 30 Aug 2024 18:54:51 +0200 Subject: [PATCH] Attempt to account for BuildTools installer's lack of \ --- src/microsoft_craziness.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/microsoft_craziness.h b/src/microsoft_craziness.h index 899583143..b0fd22a23 100644 --- a/src/microsoft_craziness.h +++ b/src/microsoft_craziness.h @@ -684,8 +684,14 @@ gb_internal void find_visual_studio_paths_from_env_vars(Find_Result *result) { ? str_lit("lib\\x64\\") : str_lit("lib\\x86\\"); - result->vs_exe_path = mc_concat(vctid, exe); - result->vs_library_path = mc_concat(vctid, lib); + if (string_ends_with(vctid, str_lit("\\"))) { + result->vs_exe_path = mc_concat(vctid, exe); + result->vs_library_path = mc_concat(vctid, lib); + } else { + result->vs_exe_path = mc_concat(vctid, str_lit("\\"), exe); + result->vs_library_path = mc_concat(vctid, str_lit("\\"), lib); + } + vs_found = true; }