From b5da012622b2c68049e2ccc309fa8e590f5c46e5 Mon Sep 17 00:00:00 2001 From: xuhong Date: Thu, 27 Jun 2024 16:26:44 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=A7=A3=E5=86=B3=E2=80=98No=20data?= =?UTF-8?q?=20fields=E2=80=99=E5=AF=BC=E8=87=B4=E5=90=8E=E7=BB=AD=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/gdb_expansion.ts | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/backend/gdb_expansion.ts b/src/backend/gdb_expansion.ts index c99ad95..e0c2fb2 100644 --- a/src/backend/gdb_expansion.ts +++ b/src/backend/gdb_expansion.ts @@ -323,21 +323,20 @@ export function expandValue(variableCreate: Function, value: string, root: strin evaluateName = getNamespace(name); } - // value = value.trim(); - // if (value[0] == ',') - // { - // var tmp = value - // tmp = tmp.substr(1).trim(); - // tmp = tmp.trim(); - // if(tmp[0] == '{' && jsonVar == true){ - // tmp = ",anonymous union = " + tmp; - // value = tmp; - // } - // else if(tmp.startsWith("")){ - // value = tmp = tmp.substr("".length); - // } - - // } + value = value.trim(); + if (value[0] == ',') + { + var tmp = value + tmp = tmp.substr(1).trim(); + tmp = tmp.trim(); + if(tmp[0] == '{' && jsonVar == true){ + tmp = ",anonymous union = " + tmp; + value = tmp; + } + else if(tmp.startsWith("")){ + value = tmp = tmp.substring("".length); + } + } return { name: name,