Merge branch 'refactoring' of https://secure.softndesign.org/git/calc into refactoring
[calc.git] / tabular.c
index 60709aa9dd5d8409c8b0b41776f212f1a76a72c4..83c17898248b07dd3495be769bbcdc7b35eddd2c 100644 (file)
--- a/tabular.c
+++ b/tabular.c
@@ -157,8 +157,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;
     }