diff options
author | John Wiegley <johnw@newartisans.com> | 2004-04-04 23:59:20 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-04-04 23:59:20 +0000 |
commit | 42a1c0396865a7e606b9d0b35fee7aaa3ebf7166 (patch) | |
tree | 6811657dc08c2eb2b098b282c957283794005355 /amount.cc | |
parent | f672024e06b7b03c2a9287bf75faf375955fa791 (diff) | |
download | fork-ledger-42a1c0396865a7e606b9d0b35fee7aaa3ebf7166.tar.gz fork-ledger-42a1c0396865a7e606b9d0b35fee7aaa3ebf7166.tar.bz2 fork-ledger-42a1c0396865a7e606b9d0b35fee7aaa3ebf7166.zip |
*** empty log message ***
Diffstat (limited to 'amount.cc')
-rw-r--r-- | amount.cc | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -229,19 +229,23 @@ amount * gmp_amount::street(bool get_quotes) const int max = 10; while (--max >= 0) { - if (! amt->commdty()->price) { + if (! amt->commdty()->price && ! amt->commdty()->sought) { if (get_quotes) get_commodity_price(amt->commdty()); + amt->commdty()->sought = true; if (! amt->commdty()->price) break; } amount * old = amt; amt = amt->value(amt->commdty()->price); - delete old; - if (amt->commdty() == old->commdty()) + if (amt->commdty() == old->commdty()) { + delete old; break; + } + + delete old; } return amt; |