summaryrefslogtreecommitdiff
path: root/games/nethack-x11/patches/patch-ai
diff options
context:
space:
mode:
Diffstat (limited to 'games/nethack-x11/patches/patch-ai')
-rw-r--r--games/nethack-x11/patches/patch-ai20
1 files changed, 20 insertions, 0 deletions
diff --git a/games/nethack-x11/patches/patch-ai b/games/nethack-x11/patches/patch-ai
new file mode 100644
index 00000000000..7586a2f963c
--- /dev/null
+++ b/games/nethack-x11/patches/patch-ai
@@ -0,0 +1,20 @@
+$NetBSD: patch-ai,v 1.1 2003/02/19 20:25:22 pooka Exp $
+
+*** src/topten.c.orig Mon Feb 4 08:06:07 2002
+--- src/topten.c Mon Feb 10 10:48:55 2003
+***************
+*** 856,861 ****
+--- 856,867 ----
+ else {
+ if (playerct > 1) Strcat(pbuf, "any of ");
+ for (i = 0; i < playerct; i++) {
++ /* stop printing players if there are too many to fit */
++ if (strlen(pbuf) + strlen(players[i]) + 2 >= BUFSZ) {
++ if (strlen(pbuf) < BUFSZ-4) Strcat(pbuf, "...");
++ else Strcpy(pbuf+strlen(pbuf)-4, "...");
++ break;
++ }
+ Strcat(pbuf, players[i]);
+ if (i < playerct-1) {
+ if (players[i][0] == '-' &&
+