Browse Source

Don't forget to init variables

Abdullah ibn Nadjo 7 years ago
parent
commit
0ecb5353aa
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/light.c

+ 3
- 0
src/light.c View File

341
   if(light_Configuration.field == LIGHT_MIN_CAP ||
341
   if(light_Configuration.field == LIGHT_MIN_CAP ||
342
      light_Configuration.field == LIGHT_MAX_BRIGHTNESS)
342
      light_Configuration.field == LIGHT_MAX_BRIGHTNESS)
343
   {
343
   {
344
+    /* Init other values to 0 */
345
+    *rawCurr = *minCap = 0;
346
+    *hasMinCap = FALSE;
344
     return TRUE;
347
     return TRUE;
345
   }
348
   }
346
 
349