From 5fdea2cb18b3d5f721e68de3d9217aa0efb6f2f3 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 3 Aug 2017 10:19:07 -0700 Subject: [PATCH] use rfind instead of index to avoid prefix clashes #534 Signed-off-by: Nikolaj Bjorner --- scripts/mk_genfile_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mk_genfile_common.py b/scripts/mk_genfile_common.py index 678bc93c7..2e0bbe2ca 100644 --- a/scripts/mk_genfile_common.py +++ b/scripts/mk_genfile_common.py @@ -590,7 +590,7 @@ def mk_def_file_internal(defname, dll_name, export_header_files): def path_after_src(h_file): h_file = h_file.replace("\\","/") - idx = h_file.index("src/") + idx = h_file.rfind("src/") if idx == -1: return h_file return h_file[idx + 4:]