diff options
Diffstat (limited to 'lib/erl_interface/src/misc')
-rw-r--r-- | lib/erl_interface/src/misc/ei_x_encode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/erl_interface/src/misc/ei_x_encode.c b/lib/erl_interface/src/misc/ei_x_encode.c index 44dcff7664..f46118830e 100644 --- a/lib/erl_interface/src/misc/ei_x_encode.c +++ b/lib/erl_interface/src/misc/ei_x_encode.c @@ -217,7 +217,8 @@ int ei_x_encode_atom_len_as(ei_x_buff* x, const char* s, int len, enum erlang_char_encoding to_enc) { int i = x->index; - ei_encode_atom_len_as(NULL, &i, s, len, from_enc, to_enc); + if (ei_encode_atom_len_as(NULL, &i, s, len, from_enc, to_enc) == -1) + return -1; if (!x_fix_buff(x, i)) return -1; return ei_encode_atom_len_as(x->buff, &x->index, s, len, from_enc, to_enc); |