termux-packages/packages/pika/third-pink-pink-src-http_conn.cc.patch

12 lines
474 B
Diff
Raw Normal View History

2022-01-28 22:57:50 +01:00
--- a/third/pink/pink/src/http_conn.cc
+++ b/third/pink/pink/src/http_conn.cc
@@ -610,7 +610,7 @@
}
if (buf_len_ == 0) {
size_t remain_buf = static_cast<uint64_t>(kHTTPMaxMessage) - wbuf_pos_;
- size_t needed_size = std::min(remain_buf, remain_send_len_);
+ size_t needed_size = remain_buf < remain_send_len_ ? remain_buf : remain_send_len_;
buf_len_ = conn_->handles_->WriteResponseBody(
wbuf_ + wbuf_pos_, needed_size);
}