aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-08-13 20:40:47 +0000
committerlloyd <[email protected]>2012-08-13 20:40:47 +0000
commit404ae3514fbbdb51e32af1c2c1434acacf5ec20c (patch)
tree6f4107667adb924d763f6c6ab699e1ee416025d0 /src/math
parent53d53fbe291f1e049f55d9018d2b07cf62fbef24 (diff)
Fix various issues flagged by cppcheck. Nothing too interesting.
Diffstat (limited to 'src/math')
-rw-r--r--src/math/bigint/big_io.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/bigint/big_io.cpp b/src/math/bigint/big_io.cpp
index 095d56510..b561c218f 100644
--- a/src/math/bigint/big_io.cpp
+++ b/src/math/bigint/big_io.cpp
@@ -29,7 +29,7 @@ std::ostream& operator<<(std::ostream& stream, const BigInt& n)
stream.write("-", 1);
const std::vector<byte> buffer = BigInt::encode(n, base);
size_t skip = 0;
- while(buffer[skip] == '0' && skip < buffer.size())
+ while(skip < buffer.size() && buffer[skip] == '0')
++skip;
stream.write(reinterpret_cast<const char*>(&buffer[0]) + skip,
buffer.size() - skip);