Avoid possibility of using char* without initialization

This commit is contained in:
Juerd Waalboer 2020-12-26 17:44:49 +01:00
parent fe392acfbd
commit 663816223b
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ void mhz_setup() {
mhz.begin(hwserial1);
// mhz.setFilter(true, true); Library filter doesn't handle 0436
mhz.autoCalibration(true);
char v[5];
char v[5] = {};
mhz.getVersion(v);
v[4] = '\0';
if (strcmp("0436", v) == 0) mhz_co2_init = 436;