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,