From 5fd33a49655fe86c1f619926c399b728099cea3c Mon Sep 17 00:00:00 2001 From: HaseenaSainul <41037131+HaseenaSainul@users.noreply.github.com> Date: Mon, 7 Aug 2023 10:10:55 +0530 Subject: [PATCH] SubArray generation issue fix (#121) --- languages/c/Types.mjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/languages/c/Types.mjs b/languages/c/Types.mjs index 6c3c8311..8b14f4c3 100644 --- a/languages/c/Types.mjs +++ b/languages/c/Types.mjs @@ -299,11 +299,12 @@ function getSchemaTypeInfo(module = {}, json = {}, name = '', schemas = {}, pref res = getSchemaTypeInfo(module, json.items, json.items.name || name, schemas, prefix) } - name = name.endsWith("_ArrayType") ? name.split('_ArrayType')[0] : name - prefix = prefix ? prefix + name : name - let n = getTypeName(getModuleName(module), capitalize(res.name), prefix) - structure.name = name ? name + capitalize(res.name) : res.name + name = capitalize(name) + res.name = capitalize(res.name) + prefix = prefix ? prefix + ((name !== res.name) ? name : '') : name + let n = getTypeName(getModuleName(module), res.name, prefix) + structure.name = (name && (name !== res.name)) ? name + capitalize(res.name) : res.name structure.type = n + 'Array_t' structure.json = json structure.namespace = getModuleName(module)