]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/navi.c
Update copyright notice
[empserver] / src / lib / commands / navi.c
index fec4bb8c0c75fa901d7e80c304d8a07e3960a119..2f409f03f61071fa8bcbc85beec89e53d7e5fe01 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -76,7 +76,6 @@ do_unit_move(struct emp_qelem *ulist, int *together,
     int skip = 0;
     char buf[1024];
     char prompt[128];
-    char scanspace[1024];
     char pathtaken[1024];  /* Doubtful we'll have a path longer than this */
     char *pt = pathtaken;
     char bmap_flag;
@@ -92,7 +91,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
 
     if (player->argp[2]) {
        strcpy(buf, player->argp[2]);
-       cp = unit_path(*together, leader, buf);
+       cp = unit_path(*together, leader, buf, sizeof(buf));
     }
 
     *pt = '\0';
@@ -152,7 +151,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
                continue;
            }
            if (cp)
-               cp = unit_path(*together, leader, cp);
+               cp = unit_path(*together, leader, buf, sizeof(buf));
        }
        if (type == EF_SHIP) {
            rad_map_set(player->cnum, leader->x, leader->y, leader->effic,
@@ -176,7 +175,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
            cp++;
            continue;
        }
-       ac = parse(cp, scanspace, player->argp, NULL, NULL, NULL);
+       ac = parse(cp, player->argbuf, player->argp, NULL, NULL, NULL);
        if (ac <= 0) {
            player->argp[0] = "";
            cp = NULL;