commit 8ec0e86303b00e88b3f1506f6f4590a95eb38eef from: Omar Polo date: Thu Dec 02 22:57:46 2021 UTC fix val_trueish implementation consider to be true also strings and handle other integers. commit - 7a495cc06ba718ed1ad5f056fecc99a13b2b38f9 commit + 8ec0e86303b00e88b3f1506f6f4590a95eb38eef blob - 206f7b8ed623b244b39b476b06b20fc671014a4c blob + dfda1183c117b5ef500c25f2865e2354790f4aa5 --- script.c +++ script.c @@ -633,7 +633,9 @@ val_type(struct value *v) int val_trueish(struct value *a) { - return a->type == V_NUM && a->v.num; + if (val_isnum(a)) + return val_tonum(a); + return 1; } int