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:
parent
a19ff3517e
commit
fb7c519856
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user