1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

small fix to stop crash on unrecognized packets (#4092)

This commit is contained in:
Mike Killewald 2018-01-04 18:10:46 -05:00 committed by Develo
parent a19ff3517e
commit fb7c519856

View File

@ -149,7 +149,7 @@ int ArduinoOTAClass::parseInt(){
for(index = 0; index < sizeof(data); ++index){
value = _udp_ota->peek();
if(value < '0' || value > '9'){
data[index++] = '\0';
data[index] = '\0';
return atoi(data);
}
data[index] = _udp_ota->read();