address a warning in cmd.c
cmd.c: In function ‘dokeylist’:
cmd.c:2961:23: warning: ‘]’ directive writing 1 byte into a region of size between 0 and 255 [-Wformat-overflow=]
2961 | Sprintf(buf2, "[%s]", key2txt(key, buf));
| ^
This commit is contained in:
@@ -2957,7 +2957,7 @@ dokeylist(void)
|
|||||||
Sprintf(buf, "%-7s", key2txt(key, buf2));
|
Sprintf(buf, "%-7s", key2txt(key, buf2));
|
||||||
#else
|
#else
|
||||||
/* first of the keyless commands */
|
/* first of the keyless commands */
|
||||||
Sprintf(buf2, "[%s]", key2txt(key, buf));
|
Snprintf(buf2, sizeof buf2, "[%s]", key2txt(key, buf));
|
||||||
Sprintf(buf, "%-21s", buf2);
|
Sprintf(buf, "%-21s", buf2);
|
||||||
#endif
|
#endif
|
||||||
Strcat(buf, " interrupt: break out of NetHack (SIGINT)");
|
Strcat(buf, " interrupt: break out of NetHack (SIGINT)");
|
||||||
|
|||||||
Reference in New Issue
Block a user