diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-12-25 07:53:09 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-12-25 07:53:09 -0500 |
| commit | f3b3f21d3ba0fd48bc265684817cb38a70adf84b (patch) | |
| tree | ccffe66f71e3ee15166080cda2aca7d842f547a2 /sigmod/CoinListItem.cpp | |
| parent | e88f1843d61fd0d4c02fa85c3444c786f8c8fd8d (diff) | |
Bounds errors are verbose now and some unchecked conditions fixed as well
Diffstat (limited to 'sigmod/CoinListItem.cpp')
| -rw-r--r-- | sigmod/CoinListItem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sigmod/CoinListItem.cpp b/sigmod/CoinListItem.cpp index 7436cfaf..c015b6f9 100644 --- a/sigmod/CoinListItem.cpp +++ b/sigmod/CoinListItem.cpp @@ -89,15 +89,15 @@ void Sigmod::CoinListItem::setType(const Type type) void Sigmod::CoinListItem::setObject(const int object) { if (((Item == m_type) && !sigmod()->itemById(object)) || ((Species == m_type) && !sigmod()->speciesById(object))) - emit(error(bounds("object"))); + emit(error(bounds("object", object))); else CHECK(object); } void Sigmod::CoinListItem::setCost(const int cost) { - if (!cost) - emit(error(bounds("cost"))); + if (cost <= 0) + emit(error(bounds("cost", 1, INT_MAX, cost))); else CHECK(cost); } |
