Browse Source

Fixed signed integer overflow.

Branimir Karadžić 8 years ago
parent
commit
9545b84119
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/semaphore.cpp

+ 1 - 1
src/semaphore.cpp

@@ -104,7 +104,7 @@ namespace bx
 	void add(timespec& _ts, int32_t _msecs)
 	void add(timespec& _ts, int32_t _msecs)
 	{
 	{
 		uint64_t ns = toNs(_ts);
 		uint64_t ns = toNs(_ts);
-		toTimespecNs(_ts, ns + _msecs*1000000);
+		toTimespecNs(_ts, ns + uint64_t(_msecs)*1000000);
 	}
 	}
 
 
 	Semaphore::Semaphore()
 	Semaphore::Semaphore()