more progress, but create_game_array is horribly broken.

This commit is contained in:
Storm Dragon
2025-05-20 05:13:22 -04:00
parent faba6bcbcb
commit d9ef202b33
4 changed files with 9 additions and 90 deletions

View File

@ -279,8 +279,8 @@ process_launcher-flags() {
create_game_array() {
# Game array 0 bottle, 1 path, 2 title, 3+ flags
for i in "${lines[@]}" ; do
if [[ "${game}" =~ ^${i} ]]; then
# This is weird. Why do I have to set game to i before making the array?
# Escape pipe characters in both strings for regex matching
if [[ "${i//|/\\|}" =~ ^${game//|/\\|}$ ]]; then
game="$i"
IFS='|' read -ra game <<< "$i"
break
@ -510,6 +510,5 @@ done
[[ ${#game} -lt 1 ]] && exit 0
[[ "$agmNoLaunch" != "true" ]] && winetricks sandbox
[[ "$agmNoLaunch" != "true" ]] && exit 0