From 15216c7544ab79b9892ecca2cc91c3e4ace265ff Mon Sep 17 00:00:00 2001 From: Allanis Date: Mon, 10 Mar 2014 14:51:37 +0000 Subject: [PATCH] [Fix] Fixed a buffer overrun. --- src/board.c | 2 +- src/pilot.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/board.c b/src/board.c index 89e5843..7228792 100644 --- a/src/board.c +++ b/src/board.c @@ -81,7 +81,7 @@ void player_board(void) { window_addButton(wdw, 20+BUTTON_WIDTH+20, 20, BUTTON_WIDTH, BUTTON_HEIGHT, "btnStealCargo", "Cargo", board_stealCargo); window_addButton(wdw, 20+2*(BUTTON_WIDTH+20), 20, BUTTON_WIDTH, BUTTON_HEIGHT, - "btnStealFuel", "Fuel", board_stealFuel); + "btnStealCargo", "Fuel", board_stealFuel); window_addButton(wdw, -20, 20, BUTTON_WIDTH, BUTTON_HEIGHT, "btnBoardingClose", "Leave", board_exit); diff --git a/src/pilot.c b/src/pilot.c index 85d20c8..d87c569 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -1025,6 +1025,8 @@ char* pilot_getOutfits(Pilot* pilot) { if(pilot->noutfits > 0) snprintf(str, 1024, "%dx %s", pilot->outfits[0].quantity, pilot->outfits[0].outfit->name); + else + snprintf(str, 1024, "None"); /* Rest of the outfits. */ for(i = 1; i < pilot->noutfits; i++) {