aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorRicardo M. Correia <rcorreia@wizy.org>2012-06-07 19:11:15 +0200
committerRicardo M. Correia <rcorreia@wizy.org>2012-06-07 20:22:10 +0200
commit43346904e15c3f1c3f92eee140dbf37b897c7c21 (patch)
tree4937fc7f4865ca360e578d34094903bf5c21f506 /src/util.h
parent10b45b4c2e11994aa2aed966f83d84f83852d1e1 (diff)
downloadbitcoin-43346904e15c3f1c3f92eee140dbf37b897c7c21.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 0d5221c33d..cfc20b3275 100644
--- a/src/util.h
+++ b/src/util.h
@@ -288,7 +288,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;
}