]> git.pond.sub.org Git - empserver/commitdiff
(chan): Do not arbitrarily truncate representative to 8 characters,
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 3 Oct 2005 10:40:11 +0000 (10:40 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 3 Oct 2005 10:40:11 +0000 (10:40 +0000)
use the full size of struct natstr member nat_pnam.

src/lib/commands/chan.c

index 85820fa68d4a773adce3b9a627bf89d791b3d851..6f8011d3c3940d6fa81c5f1c4e737ffeebef9c81 100644 (file)
@@ -118,7 +118,7 @@ chan(void)
        if ((p = getstarg(player->argp[2],
                          "New representative name -- ", buf)) == 0)
            return RET_SYN;
-       p[8] = 0;
+       p[sizeof(us->nat_pnam) - 1] = 0;
        strcpy(us->nat_pnam, p);
        putnat(us);
        break;