Sfoglia il codice sorgente

Don't forget to init variables

Abdullah ibn Nadjo 6 anni fa
parent
commit
0ecb5353aa
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3
    0
      src/light.c

+ 3
- 0
src/light.c Vedi File

@@ -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