From 9f57d0ebf03b0456dbc925f3bf066c68c04ecdb3 Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Tue, 14 Nov 2017 03:58:41 +0000 Subject: [PATCH] intercept: Fix one of the Ubuntu crashes Signed-off-by: Ikey Doherty --- src/intercept/main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/intercept/main.c b/src/intercept/main.c index cae719c..68e8615 100644 --- a/src/intercept/main.c +++ b/src/intercept/main.c @@ -211,9 +211,9 @@ _nica_public_ unsigned int la_version(unsigned int supported_version) */ char *lsi_search_steam(const char *name) { - /* Find out if it exists */ - bool file_exists = lsi_file_exists(name); - const char *replace = NULL; + if (!lsi_file_exists(name)) { + return (char *)name; + } /* Find out if its a Steam private lib.. These are relative "./" files too! */ if (name && (strstr(name, "/Steam/") || strncmp(name, "./", 2) == 0)) { @@ -222,17 +222,10 @@ char *lsi_search_steam(const char *name) return (char *)name; } } - if (file_exists) { - lsi_log_debug("blacklisted loading of vendor library: \033[34;1m%s\033[0m", - name); - } + lsi_log_debug("blacklisted loading of vendor library: \033[34;1m%s\033[0m", name); return NULL; } - if (lsi_override_replace_with_host(name, &replace, NULL)) { - return (char *)replace; - } - return (char *)name; }