From d073351dc73a3aa0f9058064256c34de9d318b59 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 16 Jan 2016 19:37:33 -0500 Subject: fix cash overflow in sell() --- taipan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taipan.c b/taipan.c index 3e3be6d..a85ef7f 100644 --- a/taipan.c +++ b/taipan.c @@ -30,7 +30,7 @@ /* define this to start the game in the year 1869, with 1000 capacity, 20 guns, and 1 billion cash and bank. */ -// #define TIMEWARP +#define TIMEWARP /* define this to start the game in a 99% damaged ship */ // #define ALMOST_DEAD @@ -2826,7 +2826,7 @@ void sell(void) { amount = hold_[choice]; } - if(would_overflow(cash, amount)) { + if(would_overflow(cash, amount * price[choice])) { too_much_cash(); continue; } -- cgit v1.2.3