+ fixed segfault when no parameters are given to math
authorJohn Beppu <beppu@lbox.org>
Sun, 16 Apr 2000 10:55:27 +0000 (10:55 -0000)
committerJohn Beppu <beppu@lbox.org>
Sun, 16 Apr 2000 10:55:27 +0000 (10:55 -0000)
math.c

diff --git a/math.c b/math.c
index 3b459f62efb5c53319391bfd8f9f7bc4810afda3..96afafdef23f5ac7f57026114714ea557b3df214 100644 (file)
--- a/math.c
+++ b/math.c
@@ -130,7 +130,7 @@ static void stack_machine(const char *argument)
 
 int math_main(int argc, char **argv)
 {
-       if (argc < 1 || *argv[1]=='-')
+       if (argc <= 1 || *argv[1]=='-')
                usage(math_usage);
        while (argc >= 2) {
                stack_machine(argv[1]);