From 43346904e15c3f1c3f92eee140dbf37b897c7c21 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 7 Jun 2012 19:11:15 +0200 Subject: [PATCH] Don't overflow integer on 32-bit machines. This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv. --- src/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }