Reuse the ParseSubTime in TimeFromString.

This commit is contained in:
Damiano Galassi committed 2015-11-25 16:51:32 +01:00
1 parent 0ef2593efa
commit 2f9de48bdf
2 files changed
+6 -10

No files matched your search

+4 -1
View File
@@ -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) {