From 217fe6dd16b4ef806d961043b98f7b4bf0b1358b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 18 Jul 2010 18:16:01 +0200 Subject: [PATCH] Fix sail command to support full path length Off-by-one in cmd_sail_ship() chopped off the last character of full-length sail paths. --- src/lib/commands/sail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/commands/sail.c b/src/lib/commands/sail.c index e9b8537f..5ab94d0c 100644 --- a/src/lib/commands/sail.c +++ b/src/lib/commands/sail.c @@ -127,7 +127,7 @@ cmd_sail_ship(struct nstr_item *nstr) return RET_FAIL; if (!check_ship_ok(&ship)) continue; - strncpy(ship.shp_path, cp, sizeof(ship.shp_path) - 2); + strncpy(ship.shp_path, cp, sizeof(ship.shp_path) - 1); ship.shp_mission = 0; putship(ship.shp_uid, &ship); }