correct stack order conditions
[calc.git] / tabular.c
index 0252a8e8ec1bf82aad5e3f6a723db40644fe35de..a7916a47531a60aad42c59f6c8962b0a51b58f28 100644 (file)
--- a/tabular.c
+++ b/tabular.c
@@ -154,8 +154,8 @@ double pop_tab (tab_t *tab, int id)
 void order_tab (tab_t *tab)
 {
     int i, j;
-    if ((!tab) || (tab->size < 3)) {
-        VERBOSE (WARNING, fprintf (stdout, "error not enough element in stack (%d)\n", tab->size));
+    if ((!tab) || (tab->size < 2)) {
+        VERBOSE (WARNING, fprintf (stdout, "error not enough element in stack (%d)\n", (tab) ? tab->size : 0));
         return;
     }