From 8215a7a3eea8f36532ceac31e48fbc6337cb9a8b Mon Sep 17 00:00:00 2001 From: Paul Guyot Date: Fri, 4 Jun 2010 10:14:00 +0200 Subject: Fix erts_bld_string_n (called by enif_make_string and erlang:decode_packet/3) to work with 8 bits characters --- erts/emulator/beam/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam') 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; } } -- cgit v1.2.3