From 38b070776b2e3270e3cf6d353913429e3b11cbc9 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 20 Jan 2007 06:58:56 +0000 Subject: minor fixes to evaluator git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@750 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- evaluator.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'evaluator.c') diff --git a/evaluator.c b/evaluator.c index c4c46a5..e2b103f 100644 --- a/evaluator.c +++ b/evaluator.c @@ -310,6 +310,10 @@ double R2N(RESULT * result) return 0.0; } + if (result->type == 0) { + return 0.0; + } + if (result->type & R_NUMBER) { return result->number; } @@ -332,6 +336,10 @@ char *R2S(RESULT * result) return NULL; } + if (result->type == 0) { + return NULL; + } + if (result->type & R_STRING) { return result->string; } -- cgit v1.2.3