Use the first n digit of subsecond instead of discarding it if too big.
This commit is contained in:
1 parent
2f9de48bdf
commit
55c0259a71
1 file changed
+3
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user