diff --git a/src/cmd.c b/src/cmd.c index 978e500b0..6f67db776 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2957,7 +2957,7 @@ dokeylist(void) Sprintf(buf, "%-7s", key2txt(key, buf2)); #else /* first of the keyless commands */ - Sprintf(buf2, "[%s]", key2txt(key, buf)); + Snprintf(buf2, sizeof buf2, "[%s]", key2txt(key, buf)); Sprintf(buf, "%-21s", buf2); #endif Strcat(buf, " interrupt: break out of NetHack (SIGINT)");