From 3a2581ead0938607eb358535c7aa8a52d4a9a3e0 Mon Sep 17 00:00:00 2001
From: Toke Eskildsen <te@ekot.dk>
Date: Wed, 25 Jun 2014 14:53:25 +0200
Subject: [PATCH] Bugfix: The substring extraction failed under some versions
 of bash

---
 quack_helper_common.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/quack_helper_common.sh b/quack_helper_common.sh
index 3708db6..7fb4358 100755
--- a/quack_helper_common.sh
+++ b/quack_helper_common.sh
@@ -60,9 +60,9 @@ export -f addGetCounter
 # Increments the counter with milliseconds from currenttime-starttime
 function updateTiming() {
     local START=$2
-    local START=${START:0:-6}
+    local START=${START:0:${#START}-6}
     local END=`date +%s%N`
-    local END=${END:0:-6}
+    local END=${END:0:${#END}-6}
     addDeltaGetCounter $1 $((END-START))
 }
 export -f updateTiming
-- 
GitLab