Skip to content

Commit 89931c1

Browse files
committed
Urgent fix of previous PR #148: Arduino Core 2 has a different implementation of size()
1 parent 5930f1b commit 89931c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebResponses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ AsyncResponseStream::AsyncResponseStream(const char *contentType, size_t bufferS
822822
_contentType = contentType;
823823
// internal buffer will be null on allocation failure
824824
_content = std::unique_ptr<cbuf>(new cbuf(bufferSize));
825-
if (_content->size() != bufferSize) {
825+
if (bufferSize && _content->size() < bufferSize) {
826826
#ifdef ESP32
827827
log_e("Failed to allocate");
828828
#endif

0 commit comments

Comments
 (0)