Skip to content

Commit fb7c519

Browse files
mkillewalddevyte
authored andcommitted
small fix to stop crash on unrecognized packets (#4092)
1 parent a19ff35 commit fb7c519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ArduinoOTA/ArduinoOTA.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int ArduinoOTAClass::parseInt(){
149149
for(index = 0; index < sizeof(data); ++index){
150150
value = _udp_ota->peek();
151151
if(value < '0' || value > '9'){
152-
data[index++] = '\0';
152+
data[index] = '\0';
153153
return atoi(data);
154154
}
155155
data[index] = _udp_ota->read();

0 commit comments

Comments
 (0)