diff --git a/gaboshlib/g_calc.sh b/gaboshlib/g_calc.sh index 763547e..b9c9d62 100644 --- a/gaboshlib/g_calc.sh +++ b/gaboshlib/g_calc.sh @@ -27,7 +27,7 @@ function g_calc { read -u ${g_fd_bc_out} g_calc_result # check if there is a output - if [ -z $g_calc_result ] + if [ -z "$g_calc_result" ] then echo "${FUNCNAME} $@" 1>&2 unset g_calc_result @@ -48,7 +48,7 @@ function g_calc { [[ $g_calc_result == *"." ]] && g_calc_result=${g_calc_result%?} # check output - if ! g_num_valid_number $g_calc_result + if ! g_num_valid_number "$g_calc_result" then echo "${FUNCNAME} $@" 1>&2 unset g_calc_result