diff options
Diffstat (limited to 'src/auxiliaryFunctions/find/dfinda.c')
-rw-r--r-- | src/auxiliaryFunctions/find/dfinda.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/auxiliaryFunctions/find/dfinda.c b/src/auxiliaryFunctions/find/dfinda.c index 2aa5f7fe..f5d80ffc 100644 --- a/src/auxiliaryFunctions/find/dfinda.c +++ b/src/auxiliaryFunctions/find/dfinda.c @@ -16,7 +16,10 @@ void dfinda(double* x, int size ,double *out, int *indiceOut) { int i = 0; *indiceOut = 0; - + + /* Initialisation de out à -1 */ + for (i=0;i<size;i++) out[i]=-1; + for (i = 0; i < size ; ++i) { if (x[i] != 0) { out[*indiceOut] = (double)(i + 1); |