1
0
mirror of https://github.com/revspace/operame synced 2024-12-04 21:57:30 +00:00

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

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;