mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lws_struct: handle empty char array serialization
This commit is contained in:
parent
fb3fd499e3
commit
370ba6f5ed
1 changed files with 4 additions and 0 deletions
|
@ -478,6 +478,10 @@ lws_struct_json_serialize(lws_struct_serialize_t *js, uint8_t *buf,
|
|||
/* early check if the entry should be elided */
|
||||
|
||||
switch (map->type) {
|
||||
case LSMT_STRING_CHAR_ARRAY:
|
||||
if (!q)
|
||||
goto up;
|
||||
break;
|
||||
case LSMT_STRING_PTR:
|
||||
case LSMT_CHILD_PTR:
|
||||
q = (char *)*(char **)q;
|
||||
|
|
Loading…
Add table
Reference in a new issue