Skip to content

Commit

Permalink
One more byte for error
Browse files Browse the repository at this point in the history
  • Loading branch information
brndnmtthws committed Nov 19, 2023
1 parent b9e7fa0 commit 2fbe79a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ static int x11_error_handler(Display *d, XErrorEvent *err) {
"length", "implementation"};
error_name = const_cast<char *>(NAMES[err->error_code].c_str());
} else {
static char code_name_buffer[4];
static char code_name_buffer[5];
error_name = reinterpret_cast<char *>(&code_name_buffer);
snprintf(error_name, 3, "%d", err->error_code);
snprintf(error_name, 4, "%d", err->error_code);
}
}
if (code_description == nullptr) {
Expand Down

0 comments on commit 2fbe79a

Please sign in to comment.