aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-16 19:37:33 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-16 19:37:33 -0500
commitd073351dc73a3aa0f9058064256c34de9d318b59 (patch)
tree6c30951110267decd02a5588d02303ad2ead5564
parentddce52f2f6b09f6ada332c4061a3f55a490a886d (diff)
downloadtaipan-d073351dc73a3aa0f9058064256c34de9d318b59.tar.gz
fix cash overflow in sell()
-rw-r--r--taipan.c4
1 files 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;
}