diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-07-10 09:08:24 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-07-10 09:08:24 +1000 |
| commit | 580c62a266439c24d0941d3b7e4c42149ab4a8e1 (patch) | |
| tree | 7597c0afa4ba46f96829658445b15dbad38cd7f9 /src/file.hh | |
| parent | 9d706ce0b7d0f744274c6c19bbcd73f0c37205dd (diff) | |
More CI compilation fixes
Diffstat (limited to 'src/file.hh')
| -rw-r--r-- | src/file.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file.hh b/src/file.hh index f5dfa112..5362b342 100644 --- a/src/file.hh +++ b/src/file.hh @@ -115,7 +115,7 @@ struct BufferedWriter while (not data.empty()) { const ByteCount length = data.length(); - const ByteCount write_len = std::min(length, size - m_pos); + const ByteCount write_len = clamp(length, ByteCount{0}, size - m_pos); memcpy(m_buffer + m_pos, data.data(), (int)write_len); m_pos += write_len; if (m_pos == size) |
