Skip to content

Commit

Permalink
GameScope: Use -wA1 in getGameScopeArg to avoid overlap when switch…
Browse files Browse the repository at this point in the history
…es and flags start with the same letter (#1027)
  • Loading branch information
sonic2kk authored Jan 27, 2024
1 parent 6fc2a35 commit 0a69eda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240119-1"
PROGVERS="v14.0.20240127-1"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -11054,10 +11054,10 @@ function setGameScopeVars {
if grep -qw "$FLAG" <<< "$ARGS"; then
if [[ $ARGTYPE =~ "cb" ]] || [[ $ARGTYPE =~ "num" ]]; then
# Get the value given to the argument as the enabled/selected value, e.g. get '2' from '-U 2' if we passed '-U'
tr ' ' '\n' <<< "$ARGS" | grep -A1 "$FLAG" | tail -n1
tr ' ' '\n' <<< "$ARGS" | grep -wA1 "$FLAG" | tail -n1
elif [[ $ARGTYPE =~ "path" ]] || [[ $ARGTYPE =~ "txt" ]]; then
# Get value given to arguments with two dashes, like `--`
echo "$ARGS" | sed 's:--:\n--:g' | grep -A1 "$FLAG" | sed "s:${UNESCAPED_FLAG}::g;s:-:\n-:g" | head -n1 | xargs
echo "$ARGS" | sed 's:--:\n--:g' | grep -wA1 "$FLAG" | sed "s:${UNESCAPED_FLAG}::g;s:-:\n-:g" | head -n1 | xargs
else
echo "$TRUEVAL"
fi
Expand Down

0 comments on commit 0a69eda

Please sign in to comment.