From f6d034b7e53a6f49f4cee51c8b10ddcacc9b7978 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 5 Nov 2017 16:32:45 -0500 Subject: [PATCH] Shouldnt touch Google.Protobuf stuff. --- Deps/Source/Google.Protobuf/JsonParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Deps/Source/Google.Protobuf/JsonParser.cs b/Deps/Source/Google.Protobuf/JsonParser.cs index 32aac0e3e..6b6f2d9ae 100644 --- a/Deps/Source/Google.Protobuf/JsonParser.cs +++ b/Deps/Source/Google.Protobuf/JsonParser.cs @@ -884,8 +884,8 @@ namespace Google.Protobuf if (subseconds != "") { // This should always work, as we've got 1-9 digits. - if (int.TryParse(subseconds.Substring(1), out int parsedFraction)) - nanos = parsedFraction * SubsecondScalingFactors[subseconds.Length] * multiplier; + int parsedFraction = int.Parse(subseconds.Substring(1)); + nanos = parsedFraction * SubsecondScalingFactors[subseconds.Length] * multiplier; } if (!Duration.IsNormalized(seconds, nanos)) {