fix time not casted to tfc_useconds incorrectly.
[tfcrypt.git] / tfc_misc.c
index 57e6b2f67861e7cbd63d0f9c8383c22bebeba161..3bfd214c1914163bf0019a4241e52eb11a035a8c 100644 (file)
@@ -89,7 +89,7 @@ void tfc_getcurtime(tfc_useconds *tx)
        memset(&t, 0, sizeof(t));
 
        gettimeofday(&t, NULL);
-       *tx = t.tv_sec * 1000000 + t.tv_usec;
+       *tx = (tfc_useconds)t.tv_sec * 1000000 + t.tv_usec;
 
        memset(&t, 0, sizeof(t));
 }