From 14d43d12359ba14e4bb95c24903be70808f66738 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 22 Jan 2022 10:46:18 -0700 Subject: [PATCH] [unsafe-to-concat] Adjust end conditions --- src/hb-buffer.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh index 4a567b3e1..b92c87693 100644 --- a/src/hb-buffer.hh +++ b/src/hb-buffer.hh @@ -392,8 +392,7 @@ struct hb_buffer_t bool interior = false, bool from_out_buffer = false) { - if (end == (unsigned) -1) - end = len; + end = hb_min (end, len); if (interior && !from_out_buffer && end - start < 2) return;