Reuse the ParseSubTime in TimeFromString.
This commit is contained in:
1 parent
0ef2593efa
commit
2f9de48bdf
2 files changed
+6
-10
No files matched your search
@@ -248,7 +248,10 @@ unsigned ParseSubTime(const char *time, unsigned secondScale, BOOL hasSign)
|
||||
}
|
||||
|
||||
if (sscanf(time, "%u:%u:%u%[,.:]%u", &hour, &minute, &second, separator, &subsecond) < 5) {
|
||||
return 0;
|
||||
subsecond = 0;
|
||||
if (sscanf(time, "%u:%u:%u", &hour, &minute, &second) < 3) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (second > 60) {
|
||||
|
||||
Reference in new issue
Block a user