diff options
author | Sverker Eriksson <[email protected]> | 2017-03-08 14:46:24 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-03-08 18:07:09 +0100 |
commit | 32d13d59910a384ad09682cafc83c7300c96c694 (patch) | |
tree | 1f5bfca2565243210b16a6de2bdc3ae66cbff8bb /lib/erl_interface/src/encode/encode_boolean.c | |
parent | 65b04e233e09e3cc2e0fda3c28e155b95c5a4baf (diff) | |
download | otp-32d13d59910a384ad09682cafc83c7300c96c694.tar.gz otp-32d13d59910a384ad09682cafc83c7300c96c694.tar.bz2 otp-32d13d59910a384ad09682cafc83c7300c96c694.zip |
erl_interface: Do not generate atoms on old latin1 ext format
Solved by letting ei_encode_atom_as ignore 'to_enc' argument
and always encode in UTF8 format.
Diffstat (limited to 'lib/erl_interface/src/encode/encode_boolean.c')
-rw-r--r-- | lib/erl_interface/src/encode/encode_boolean.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/erl_interface/src/encode/encode_boolean.c b/lib/erl_interface/src/encode/encode_boolean.c index 61e7e5e6e7..053029af05 100644 --- a/lib/erl_interface/src/encode/encode_boolean.c +++ b/lib/erl_interface/src/encode/encode_boolean.c @@ -32,12 +32,12 @@ int ei_encode_boolean(char *buf, int *index, int p) val = p ? "true" : "false"; len = strlen(val); - if (!buf) s += 3; + if (!buf) s += 2; else { - put8(s,ERL_ATOM_EXT); - put16be(s,len); + put8(s, ERL_SMALL_ATOM_UTF8_EXT); + put8(s, len); - memmove(s,val,len); /* unterminated string */ + memcpy(s,val,len); /* unterminated string */ } s += len; |