Vanilla List Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xtkill.c



Just a small little fix here to allow xtkill to access up to MAXPLAYER=36.

--- Vanilla-2.9pl5/tools/xtkill.c       Mon Nov 15 20:10:42 1999
+++ Vanilla-2.9pl5-mark/tools/xtkill.c  Sun Feb 27 13:39:10 2000
@@ -37,12 +37,16 @@
     player=atoi(argv[1]);
     if ((player == 0) && (*argv[1] != '0')) {
        c = *argv[1];
-       if (c >= 'a' && c <= 'j')
+       if (c >= 'a' && c <= 'z')
            player = c - 'a' + 10;
        else {
            Usage();
        }
     }
+    if (player >= MAXPLAYER) {
+      printf("MAXPLAYER is set to %d.\n", MAXPLAYER);
+      exit(1);
+    }
     if (players[player].p_status != PALIVE) {
        if (argc > 2)
            if (*argv[2] == 'F') 
@@ -236,7 +240,7 @@
 static void Usage(void)
 {
     printf("\
-    xtkill [0-9a-j] <mode><mode option>\n\
+    xtkill [0-9a-z] <mode><mode option>\n\
 \n\
     where <mode> is one of :\n\
       e(ject from game)             (simulates self-destruct)\n\


-- 
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/