Skip to content

Commit

Permalink
encode: fix empty FIELD_2DD_VECTOR
Browse files Browse the repository at this point in the history
Fixes GH #178 null_pointer1 case
  • Loading branch information
rurban committed Dec 31, 2019
1 parent 95cc930 commit d7913b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ static bool env_var_checked_p;

#define FIELD_2DD_VECTOR(nam, size, dxf) \
OVERFLOW_CHECK (nam, _obj->size) \
FIELD_2RD (nam[0], dxf); \
if (_obj->size) \
FIELD_2RD (nam[0], dxf); \
for (vcount = 1; vcount < (BITCODE_BL)_obj->size; vcount++) \
{ \
FIELD_2DD (nam[vcount], FIELD_VALUE (nam[vcount - 1].x), \
Expand Down

0 comments on commit d7913b8

Please sign in to comment.