From 909ab13aeb13bf75ba87c23fe5a03d15f61b1c7f Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 29 Aug 2020 20:59:52 +0100 Subject: [PATCH] Make LCC path resolution more robust --- code/tools/lcc/etc/bytecode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/tools/lcc/etc/bytecode.c b/code/tools/lcc/etc/bytecode.c index 6e580228..4a2fe445 100644 --- a/code/tools/lcc/etc/bytecode.c +++ b/code/tools/lcc/etc/bytecode.c @@ -38,7 +38,10 @@ void UpdatePaths( const char *lccBinary ) strncpy( basepath, lccBinary, basepathsz ); basepath[basepathsz] = 0; - p = strrchr( basepath, PATH_SEP ); + p = strrchr( basepath, '/' ); + + if( !p ) + p = strrchr( basepath, '\\' ); if( p ) {