From 84daa06581edfec490db1060c56a6594372da602 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Tue, 17 Oct 2023 14:24:08 +0200 Subject: [PATCH] mangohud biun: dlsym: don't shift when env variable --- bin/mangohud.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/mangohud.in b/bin/mangohud.in index 4c5fce72..71f28a45 100755 --- a/bin/mangohud.in +++ b/bin/mangohud.in @@ -10,9 +10,11 @@ fi MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_opengl.so" -if [ "$1" = "--dlsym" ] || [ "$MANGOHUD_DLSYM" = "1" ]; then - MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" - shift +if [ "$1" = "--dlsym" ]; then + MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" + shift # shift will only be executed if $1 is "--dlsym" +elif [ "$MANGOHUD_DLSYM" = "1" ]; then + MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" fi if [ "$1" = "--version" ]; then