* Bug #13513 fixed - EXPRESSION block with "u1" as expression failed with a
[scilab.git] / scilab / modules / scicos_blocks / src / c / evaluate_expr.c
index f869a2d..5ad8049 100644 (file)
@@ -111,7 +111,7 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                 case 5:
                     count = count + 1;
                     /* invalid script : call a function without lhs */
-                    if (bottom <= 0)
+                    if (bottom < 0)
                     {
                         set_block_error(-2);
                         return;
@@ -491,11 +491,11 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                                 stack[bottom] = (double) block->mode[nzcr];
                             }
                             break;
-                            /*  if (stack[bottom]>0) {
-                              stack[bottom]=floor(stack[bottom]+.5);
-                            }else{
-                              stack[bottom]=ceil(stack[bottom]-.5);
-                            }*/
+                        /*  if (stack[bottom]>0) {
+                          stack[bottom]=floor(stack[bottom]+.5);
+                        }else{
+                          stack[bottom]=ceil(stack[bottom]-.5);
+                        }*/
                         case 111:
                             if (block->ng > 0)
                             {
@@ -595,13 +595,13 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                                 stack[bottom] = (double) block->mode[nzcr];
                             }
                             break;
-                            /* if (stack[bottom]>0) {
-                              stack[bottom]=1.0;
-                            }else if(stack[bottom]<0){
-                              stack[bottom]=-1.0;
-                            }else{
-                              stack[bottom]=0.0;
-                              }*/
+                        /* if (stack[bottom]>0) {
+                          stack[bottom]=1.0;
+                        }else if(stack[bottom]<0){
+                          stack[bottom]=-1.0;
+                        }else{
+                          stack[bottom]=0.0;
+                          }*/
                         case 114:  /* abs */
                             if (block->ng > 0)
                             {
@@ -643,11 +643,11 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                                 stack[bottom] = stack[bottom] * (block->mode[nzcr]);
                             }
                             break;
-                            /* if (stack[bottom]>0) {
-                              stack[bottom]=stack[bottom];
-                            }else {
-                              stack[bottom]=-stack[bottom];
-                              }*/
+                        /* if (stack[bottom]>0) {
+                          stack[bottom]=stack[bottom];
+                        }else {
+                          stack[bottom]=-stack[bottom];
+                          }*/
                         case 115:
                             if (block->ng > 0)
                             {