forked from loafle/openapi-generator-original
[C][Client] Allocate memory for the element of array when the type is number (#10124)
This commit is contained in:
parent
7dcca2e891
commit
bd8efe2f91
@ -666,7 +666,13 @@ fail:
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
list_addElement({{{name}}}List , &{{{name}}}_local->valuedouble);
|
||||
double *{{{name}}}_local_value = (double *)calloc(1, sizeof(double));
|
||||
if(!{{{name}}}_local_value)
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
*{{{name}}}_local_value = {{{name}}}_local->valuedouble;
|
||||
list_addElement({{{name}}}List , {{{name}}}_local_value);
|
||||
{{/isNumeric}}
|
||||
{{#isBoolean}}
|
||||
if(!cJSON_IsBool({{{name}}}_local))
|
||||
|
Loading…
x
Reference in New Issue
Block a user