浏览代码

Don't forget to init variables

Abdullah ibn Nadjo 7 年前
父节点
当前提交
0ecb5353aa
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/light.c

+ 3
- 0
src/light.c 查看文件

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