Scicos simulation: fix the simulation after f5d00d 73/13373/1
Clément DAVID [Mon, 16 Dec 2013 14:36:20 +0000 (15:36 +0100)]
Fix the Reinitialization issue, pass DEBUG_SCICOS.tst

Change-Id: Icec969d53cd1753fe8c7b886660b483471f94b53

scilab/modules/scicos/src/c/scicos.c

index 6019cd9..493a247 100644 (file)
@@ -1185,7 +1185,7 @@ static void cosini(double *told)
                         int outtbdptr_isnan = outtbdptr[kk] != outtbdptr[kk];
                         int outtbd_isnan = (SCSREAL_COP)outtbd[curouttbd + kk] != (SCSREAL_COP)outtbd[curouttbd + kk];
 
-                        if (outtbdptr_isnan == outtbd_isnan)
+                        if (outtbdptr_isnan && outtbd_isnan)
                         {
                             continue;
                         }
@@ -1205,11 +1205,11 @@ static void cosini(double *told)
                         int outtbdptr_isnan = outtbdptr[kk] != outtbdptr[kk];
                         int outtbd_isnan = (SCSCOMPLEX_COP)outtbd[curouttbd + kk] != (SCSCOMPLEX_COP)outtbd[curouttbd + kk];
 
-                        if (outtbdptr_isnan == outtbd_isnan)
+                        if (outtbdptr_isnan && outtbd_isnan)
                         {
                             continue;
                         }
-                        if (outtbdptr[kk] != (SCSCOMPLEX_COP)outtbd[curouttbd + kk] && outtbdptr[kk] == outtbdptr[kk])
+                        if (outtbdptr[kk] != (SCSCOMPLEX_COP)outtbd[curouttbd + kk])
                         {
                             goto L30;
                         }