From 36774a612db92a32235afce2131912c5eaef21e0 Mon Sep 17 00:00:00 2001 From: Brian Koropoff Date: Sun, 23 Feb 2003 21:14:33 +0000 Subject: [PATCH] Use atof when checking truth values. --- libs/gib/gib_execute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/gib/gib_execute.c b/libs/gib/gib_execute.c index ddb713a91..fe63f106c 100644 --- a/libs/gib/gib_execute.c +++ b/libs/gib/gib_execute.c @@ -195,7 +195,7 @@ GIB_Execute (cbuf_t * cbuf) gib_buffer_data_t *g = GIB_DATA (cbuf); gib_builtin_t *b; gib_function_t *f; - int cond; + double cond; if (!g->program) return; @@ -206,8 +206,8 @@ GIB_Execute (cbuf_t * cbuf) return; if (g->ip->flags & TREE_COND) { cond = g->ip->flags & TREE_NOT ? - atoi (cbuf->args->argv[1]->str) : - !atoi (cbuf->args->argv[1]->str); + atof (cbuf->args->argv[1]->str) : + !atof (cbuf->args->argv[1]->str); if (cond) g->ip = g->ip->jump; } else if (g->ip->flags & TREE_FORNEXT) {