diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 14:33:37 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 14:33:37 -0400 |
| commit | 29fab56493a2041b26851f5af65c91d360457e47 (patch) | |
| tree | 39d955fcd64c7781d7070bc446fba66d04db9921 /src/stdlib/text.c | |
| parent | 85e7fc5d01225c6f8565f19203cfaf6cde7822c1 (diff) | |
Make buffer big enough for NUL byte
Diffstat (limited to 'src/stdlib/text.c')
| -rw-r--r-- | src/stdlib/text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/text.c b/src/stdlib/text.c index b2ed3c8b..5242a8e8 100644 --- a/src/stdlib/text.c +++ b/src/stdlib/text.c @@ -1157,7 +1157,7 @@ static INLINE Text_t _quoted(Text_t text, bool colorize, char quote_char) case '\x1C' ... '\x1F': case '\x7F' ... '\x7F': { if (colorize) ret = concat2_assuming_safe(ret, Text("\x1b[34;1m")); ret = concat2_assuming_safe(ret, Text("\\x")); - char tmp[2]; + char tmp[3]; sprintf(tmp, "%02X", g); ret = concat2_assuming_safe(ret, Text$from_strn(tmp, 2)); if (colorize) |
