From bf341231e98db8aa888cdbd027ec9822e966f33d Mon Sep 17 00:00:00 2001 From: Louis RUBET Date: Fri, 5 Sep 2014 10:42:09 +0200 Subject: [PATCH] Debug test_and and test_or which did not consume their arguments --- src/rpn-test.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rpn-test.h b/src/rpn-test.h index 2f244b6..f8ae874 100644 --- a/src/rpn-test.h +++ b/src/rpn-test.h @@ -90,7 +90,9 @@ void test_and(void) ARG_IS_OF_TYPE(0, cmd_number); ARG_IS_OF_TYPE(1, cmd_number); - putf((getf() != 0) && (getf() != 0)); + floating_t first = getf(); + floating_t second = getf(); + putf((first != 0) && (second != 0)); } void test_or(void) @@ -99,7 +101,9 @@ void test_or(void) ARG_IS_OF_TYPE(0, cmd_number); ARG_IS_OF_TYPE(1, cmd_number); - putf((getf() != 0) || (getf() != 0)); + floating_t first = getf(); + floating_t second = getf(); + putf((first != 0) || (second != 0)); } void test_xor(void)