summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-04-14 06:39:21 +0200
committerBardur Arantsson <bardur@scientician.net>2015-04-14 06:39:21 +0200
commit9824343f3d467f15f7faa4be9919325b72067e69 (patch)
tree41fc15bdd1e856e0e61a58b8ffbbc72a2fd87855
parentb86ae5ea1f3f9fd555f775d288b250ed820b230f (diff)
Fix bug in calculation of quantity range when buying items
The quantity range would be calculated such as if the price were 110% of the actual price, and so the player might be refused purchase of, say, an it cost 100 and the player had less than 110 gold. (It *would* have subtracted the correct amount, but the player was just refused.)
-rw-r--r--src/store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/store.cc b/src/store.cc
index 92dfbfeb..4a384b06 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -2193,7 +2193,7 @@ void store_purchase(void)
}
else
{
- q = p_ptr->au / (best + (best / 10));
+ q = p_ptr->au / best;
}
if (o_ptr->number < q)
q = o_ptr->number;