From 580c62a266439c24d0941d3b7e4c42149ab4a8e1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 10 Jul 2025 09:08:24 +1000 Subject: More CI compilation fixes --- src/file.hh | 2 +- src/normal.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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) diff --git a/src/normal.cc b/src/normal.cc index 96940a90..58013a2e 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -28,6 +28,8 @@ #include "window.hh" #include "word_db.hh" +#include + namespace Kakoune { -- cgit v1.2.3