Do not even reach normalization with 3 digits.

This commit is contained in:
Lumière Élevé 2024-08-20 09:44:26 +00:00
parent af54326102
commit 6dfee276a2

View File

@ -31,7 +31,8 @@ namespace Nikse.SubtitleEdit.Core.Common
{ {
milliseconds *= 10; milliseconds *= 10;
} }
} else { } else if (parts[3].Length > 3)
{
for (int msLength = parts[3].Length; msLength > 3; msLength --) for (int msLength = parts[3].Length; msLength > 3; msLength --)
{ {
milliseconds /= 10; milliseconds /= 10;
@ -52,7 +53,8 @@ namespace Nikse.SubtitleEdit.Core.Common
{ {
milliseconds *= 10; milliseconds *= 10;
} }
} else { } else if (parts[3].Length > 3)
{
for (int msLength = parts[3].Length; msLength > 3; msLength --) for (int msLength = parts[3].Length; msLength > 3; msLength --)
{ {
milliseconds /= 10; milliseconds /= 10;