summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-04-10 11:52:43 +0000
committerJohn Wiegley <johnw@newartisans.com>2004-04-10 11:52:43 +0000
commit9ffdff9510bd9fc2ac4a8efe8f6b94bde794fda1 (patch)
treeeeffcb9d3214a9e405a4fa395de37185b89fa206 /amount.cc
parentb5097ced2bf621c0bf9b79c9bcc85bb715ce6218 (diff)
downloadfork-ledger-9ffdff9510bd9fc2ac4a8efe8f6b94bde794fda1.tar.gz
fork-ledger-9ffdff9510bd9fc2ac4a8efe8f6b94bde794fda1.tar.bz2
fork-ledger-9ffdff9510bd9fc2ac4a8efe8f6b94bde794fda1.zip
*** empty log message ***
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/amount.cc b/amount.cc
index 6984d9bb..d3a77044 100644
--- a/amount.cc
+++ b/amount.cc
@@ -227,8 +227,10 @@ amount * gmp_amount::street(bool get_quotes) const
{
amount * amt = copy();
- int max = 10;
+ if (! amt->commdty())
+ return amt;
+ int max = 10;
while (--max >= 0) {
if (! amt->commdty()->price && ! amt->commdty()->sought) {
if (get_quotes)