aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorRicardo M. Correia <rcorreia@wizy.org>2012-06-07 19:11:15 +0200
committerLuke Dashjr <luke-jr+git@utopios.org>2012-06-18 19:39:10 +0000
commitb0d9f41cd222de5d13d2b9cec27474009029d5ec (patch)
treedd6f1b627d646331200d1ea3a421ec40951dda39 /src/util.h
parent7ff54e08aa42f10dae424711a0a3764a67eae295 (diff)
downloadbitcoin-b0d9f41cd222de5d13d2b9cec27474009029d5ec.tar.xz
Don't overflow integer on 32-bit machines.
This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 284cf33c4b..dc72968326 100644
--- a/src/util.h
+++ b/src/util.h
@@ -396,7 +396,7 @@ inline int64 GetPerformanceCounter()
#else
timeval t;
gettimeofday(&t, NULL);
- nCounter = t.tv_sec * 1000000 + t.tv_usec;
+ nCounter = (int64) t.tv_sec * 1000000 + t.tv_usec;
#endif
return nCounter;
}