aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-07-23 09:03:55 +0200
committerRiccardo Spagni <ric@spagni.net>2016-07-23 09:03:55 +0200
commit3720c27b7db3f1a83c7498e7187b6bbb402014e8 (patch)
tree68389ea864bbf07d489a2c76300378c9a277ce8a
parentMerge pull request #914 (diff)
parentTests: fix signed/unsigned comparison in hash-target (diff)
downloadmonero-3720c27b7db3f1a83c7498e7187b6bbb402014e8.tar.xz
Merge pull request #924
61ed40a Tests: fix signed/unsigned comparison in hash-target (anonimal)
-rw-r--r--tests/hash-target.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/hash-target.cpp b/tests/hash-target.cpp
index c46f6722b..aeb6688bc 100644
--- a/tests/hash-target.cpp
+++ b/tests/hash-target.cpp
@@ -41,7 +41,7 @@ using cryptonote::check_hash;
int main(int argc, char *argv[]) {
crypto::hash h;
for (uint64_t diff = 1;; diff += 1 + (diff >> 8)) {
- for (int b = 0; b < 256; b++) {
+ for (uint16_t b = 0; b < 256; b++) {
memset(&h, b, sizeof(crypto::hash));
if (check_hash(h, diff) != (b == 0 || diff <= 255 / b)) {
return 1;