8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9cb7c6 commit aa529ebCopy full SHA for aa529eb
libraries/HTTPClient/src/HTTPClient.cpp
@@ -921,13 +921,16 @@ String HTTPClient::getString(void)
921
{
922
StreamString sstring;
923
924
- if(_size) {
+ if(_size > 0) {
925
// try to reserve needed memmory
926
if(!sstring.reserve((_size + 1))) {
927
log_d("not enough memory to reserve a string! need: %d", (_size + 1));
928
return "";
929
}
930
931
+ else {
932
+ return "";
933
+ }
934
935
writeToStream(&sstring);
936
return sstring;
0 commit comments