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

Fix typo causing crash on missing uri scheme

This commit is contained in:
Damian Peckett 2016-01-10 14:10:29 +11:00
parent 5f80ad5a78
commit ec1c90c545

View File

@ -107,7 +107,7 @@ void HTTPClient::begin(String url, String httpsFingerprint) {
int index = url.indexOf(':');
//int index2;
bool hasPort = false;
if(index) {
if(index >= 0) {
protocol = url.substring(0, index);
url.remove(0, (index + 3)); // remove http:// or https://