diff --git a/gaboshlib/g_calc.sh b/gaboshlib/g_calc.sh index 748330a..842aa81 100644 --- a/gaboshlib/g_calc.sh +++ b/gaboshlib/g_calc.sh @@ -1,5 +1,7 @@ function g_calc { + unset g_calc_result + # Use bc in backround for multiple bc's running much faster if [ -z "${g_bc_running}" ] then @@ -49,6 +51,6 @@ function g_calc { return 1 fi - # echo result + # store result g_calc_result="${g_sed_out}" } diff --git a/gaboshlib/g_num_is_lower.sh b/gaboshlib/g_num_is_lower.sh index 00df3f4..46f3ed3 100644 --- a/gaboshlib/g_num_is_lower.sh +++ b/gaboshlib/g_num_is_lower.sh @@ -48,6 +48,7 @@ function g_num_is_lower { # Check for valid number g_num_valid_number "$f_num" "$f_checkhigher" || return 1 + g_calc "${f_num} < ${f_checkhigher}" if [ ${g_calc_result} -ne 0 ] then return 0