Parcourir la source

Don't forget to init variables

Abdullah ibn Nadjo il y a 6 ans
Parent
révision
0ecb5353aa
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3
    0
      src/light.c

+ 3
- 0
src/light.c Voir le fichier

@@ -341,6 +341,9 @@ LIGHT_BOOL light_initExecution(unsigned long *rawCurr, unsigned long *rawMax, LI
341 341
   if(light_Configuration.field == LIGHT_MIN_CAP ||
342 342
      light_Configuration.field == LIGHT_MAX_BRIGHTNESS)
343 343
   {
344
+    /* Init other values to 0 */
345
+    *rawCurr = *minCap = 0;
346
+    *hasMinCap = FALSE;
344 347
     return TRUE;
345 348
   }
346 349