From 770338d431564d261a63d256db54949031efeff0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 2 Dec 2016 00:20:21 +1300 Subject: Separate var assigns in dr(6df) by line NetBSD and FreeBSD sh(1) doesn't seem to evaluate the assignments in order, so in this change, the "d" variable doesn't get assigned correctly. This makes sense as I don't think an evaluation order is specified anywhere. It's clearer anyway. --- games/dr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'games') diff --git a/games/dr b/games/dr index a236dc1e..e1db163d 100755 --- a/games/dr +++ b/games/dr @@ -5,7 +5,9 @@ [ "$#" -eq 1 ] || exit 2 # Arcane string chopping -n=1 a=0 nd=${1%+*} d=${nd#*d} +n=1 a=0 +nd=${1%+*} +d=${nd#*d} [ "${nd%d*}" != "" ] && n=${nd%d*} [ "${1#*+}" = "$1" ] || a=${1#*+} -- cgit v1.2.3