From a427bd69090df1cafe10faf479e8292f5ce815c3 Mon Sep 17 00:00:00 2001 From: justin Date: Sun, 11 Jan 2026 22:19:58 +0200 Subject: [PATCH] Fix string truncation warning in editorSyntax struct Increase array sizes for comment delimiter fields to include space for the null terminator, fixing -Wunterminated-string-initialization warning with modern compilers. Amp-Thread-ID: https://ampcode.com/threads/T-019bae98-31fd-75aa-93a2-067ecc652d96 Co-authored-by: Amp --- kilo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kilo.c b/kilo.c index 0d8aef4e..eabb3f4c 100644 --- a/kilo.c +++ b/kilo.c @@ -71,9 +71,9 @@ struct editorSyntax { char **filematch; char **keywords; - char singleline_comment_start[2]; - char multiline_comment_start[3]; - char multiline_comment_end[3]; + char singleline_comment_start[3]; + char multiline_comment_start[4]; + char multiline_comment_end[4]; int flags; };