From 9a4d981baa1d3b6d492ba087061f3457934642f8 Mon Sep 17 00:00:00 2001 From: "Jason M. Wood" Date: Sat, 5 Oct 2013 17:16:39 -0600 Subject: [PATCH] escape the $ of the perl default variable so that it doesn't get interpreted by the shell Fixes the bug noticed by Aragno. --- minecraft_server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minecraft_server b/minecraft_server index c8dc1fc..2c37a9e 100755 --- a/minecraft_server +++ b/minecraft_server @@ -876,7 +876,7 @@ querySendPacket() { RETRY=$(($RETRY+1)) # Pack the hex string packet and write it to the query.dat buffer file. execute "$PERL -e ' - print map { pack (\"C\", hex($_)) } (\"'$PACKET'\" =~ /(..)/g); + print map { pack (\"C\", hex(\$_)) } (\"'$PACKET'\" =~ /(..)/g); ' >> $WORLD_DIR/query.dat" $USER_NAME # Give the query server a moment to respond. Sleep longer if the retry # count is high.