Use the first n digit of subsecond instead of discarding it if too big.

This commit is contained in:
Damiano Galassi committed 2015-11-25 20:04:29 +01:00
1 parent 2f9de48bdf
commit 55c0259a71
1 file changed
+3 -2
+3 -2
View File
@@ -257,8 +257,9 @@ unsigned ParseSubTime(const char *time, unsigned secondScale, BOOL hasSign)
if (second > 60) {
second = 0;
}
if (subsecond > secondScale) {
subsecond = 0;
while (subsecond > secondScale) {
subsecond /= 10;
}
timeval = hour * 60 * 60 + minute * 60 + second;