Skip to content

Commit ec1c90c

Browse files
author
Damian Peckett
committed
Fix typo causing crash on missing uri scheme
1 parent 5f80ad5 commit ec1c90c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void HTTPClient::begin(String url, String httpsFingerprint) {
107107
int index = url.indexOf(':');
108108
//int index2;
109109
bool hasPort = false;
110-
if(index) {
110+
if(index >= 0) {
111111
protocol = url.substring(0, index);
112112
url.remove(0, (index + 3)); // remove http:// or https://
113113

0 commit comments

Comments
 (0)