diff options
author | B. Watson <yalhcru@gmail.com> | 2016-01-16 19:37:33 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-01-16 19:37:33 -0500 |
commit | d073351dc73a3aa0f9058064256c34de9d318b59 (patch) | |
tree | 6c30951110267decd02a5588d02303ad2ead5564 /taipan.c | |
parent | ddce52f2f6b09f6ada332c4061a3f55a490a886d (diff) | |
download | taipan-d073351dc73a3aa0f9058064256c34de9d318b59.tar.gz |
fix cash overflow in sell()
Diffstat (limited to 'taipan.c')
-rw-r--r-- | taipan.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |