aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-06-08 10:04:13 +0000
committerErlang/OTP <[email protected]>2010-06-08 10:04:13 +0000
commitb10f0358c5286300dc9c861c6d45a10222bba3c2 (patch)
tree3b33280f378b2378aee633a85dad17ce530c91b3 /erts/emulator/beam/utils.c
parent5a5a5013c1a8a53955f6d6bca2daf36838099b6a (diff)
parent8215a7a3eea8f36532ceac31e48fbc6337cb9a8b (diff)
downloadotp-b10f0358c5286300dc9c861c6d45a10222bba3c2.tar.gz
otp-b10f0358c5286300dc9c861c6d45a10222bba3c2.tar.bz2
otp-b10f0358c5286300dc9c861c6d45a10222bba3c2.zip
Merge branch 'pg/fix_erts_bld_string_n' into dev
* pg/fix_erts_bld_string_n: Fix erts_bld_string_n (called by enif_make_string and erlang:decode_packet/3) to work with 8 bits characters OTP-8685 pg/fix_erts_bld_string_n Fix bug causing erlang:decode_packet and enif_make_string to generate faulty strings with negative character values for ascii values larger than 127. (Thanks to Paul Guyot)
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 445a8eebd9..da6f9ed12f 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -510,7 +510,7 @@ erts_bld_string_n(Uint **hpp, Uint *szp, const char *str, Sint len)
if (hpp) {
res = NIL;
while (--i >= 0) {
- res = CONS(*hpp, make_small(str[i]), res);
+ res = CONS(*hpp, make_small((byte) str[i]), res);
*hpp += 2;
}
}