From 2fbe79a65cd088f117e15c1021be97bdba1fa843 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sun, 19 Nov 2023 13:53:53 -0500 Subject: [PATCH] One more byte for error --- src/x11.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11.cc b/src/x11.cc index 481bd7707..c05e54fae 100644 --- a/src/x11.cc +++ b/src/x11.cc @@ -277,9 +277,9 @@ static int x11_error_handler(Display *d, XErrorEvent *err) { "length", "implementation"}; error_name = const_cast(NAMES[err->error_code].c_str()); } else { - static char code_name_buffer[4]; + static char code_name_buffer[5]; error_name = reinterpret_cast(&code_name_buffer); - snprintf(error_name, 3, "%d", err->error_code); + snprintf(error_name, 4, "%d", err->error_code); } } if (code_description == nullptr) {