Parcourir la source

feat: improve server configuration parsing (#4242)

This commit improves the way server configurations are parsed by using xmllint to extract values from XML files. The eval function is also used to assign the extracted value to a variable.
Daniel Gibbs il y a 3 ans
Parent
commit
5915545f93
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lgsm/modules/info_game.sh

+ 1 - 1
lgsm/modules/info_game.sh

@@ -131,7 +131,7 @@ fn_info_game_xml() {
 	else
 		servercfgparse="${servercfgfullpath}"
 	fi
-	eval "${1}"="$(xmllint --xpath "string(${2})" "${servercfgparse}")"
+	eval "${1}=\"$(xmllint --xpath "string(${2})" "${servercfgparse}")\""
 	configtype="xml"
 }