From 121deedeb5861767b436c789d73a8faa746981d8 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Tue, 30 Jun 2020 17:25:47 -0400 Subject: [PATCH] Fix trailing '.0' for Int64 values (#572) --- .../DTPipelines/Pipelines/ContextData/NumberContextData.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Sdk/DTPipelines/Pipelines/ContextData/NumberContextData.cs b/src/Sdk/DTPipelines/Pipelines/ContextData/NumberContextData.cs index 07d2172bc..82ad590b1 100644 --- a/src/Sdk/DTPipelines/Pipelines/ContextData/NumberContextData.cs +++ b/src/Sdk/DTPipelines/Pipelines/ContextData/NumberContextData.cs @@ -42,7 +42,12 @@ namespace GitHub.DistributedTask.Pipelines.ContextData var floored = Math.Floor(m_value); if (m_value == floored && m_value <= (Double)Int32.MaxValue && m_value >= (Double)Int32.MinValue) { - Int32 flooredInt = (Int32)floored; + var flooredInt = (Int32)floored; + return (JToken)flooredInt; + } + else if (m_value == floored && m_value <= (Double)Int64.MaxValue && m_value >= (Double)Int64.MinValue) + { + var flooredInt = (Int64)floored; return (JToken)flooredInt; } else