From 55573f6040d67f5a40c238b3e55fbf0a7b219bfa Mon Sep 17 00:00:00 2001 From: zengwenjie <1663900244@qq.com> Date: Thu, 16 Oct 2025 14:52:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E3=80=8CVal=5FDouble?= =?UTF-8?q?=E3=80=8D=E6=96=B9=E6=B3=95=E7=9A=84=E8=BF=90=E7=AE=97=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DeedyDesigner/Deedy.Testing/Dodo.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DeedyDesigner/Deedy.Testing/Dodo.cs b/DeedyDesigner/Deedy.Testing/Dodo.cs index fb36b21..996fa86 100644 --- a/DeedyDesigner/Deedy.Testing/Dodo.cs +++ b/DeedyDesigner/Deedy.Testing/Dodo.cs @@ -720,10 +720,10 @@ namespace Deedy.Testing private double Val_Double(object rawValue) { if (rawValue is double tValue) return tValue; - string paramExp = rawValue?.ToString() ?? "0"; - object valueExp = paramExp.StartsWith('@') ? this.ParamGetter(paramExp, 0) : paramExp; + string paramExp = rawValue?.ToString() ?? "0"; + if (double.TryParse(paramExp, out double dValue)) return dValue; + object valueExp = this.ParamGetter(paramExp, 0); if (valueExp is double pValue) return pValue; - if (double.TryParse(valueExp.ToString(), out double dValue)) return dValue; return 0; } /// @@ -1142,4 +1142,4 @@ namespace Deedy.Testing return @default; } } -} +} \ No newline at end of file