aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-06-05 15:38:13 +0200
committerPatrik Nyblom <[email protected]>2013-06-05 15:38:13 +0200
commitc6fe4731a9093166ff41d16900d22808b5a68053 (patch)
tree54fde1e5e469a31e87f4e3612e11a50dd29443b4 /erts
parenteedd89fcb0b892117b798b8b097cf63b9ab59db7 (diff)
parent0ebffb2b55bd1870bfbe0ea47aa94017d7917084 (diff)
downloadotp-c6fe4731a9093166ff41d16900d22808b5a68053.tar.gz
otp-c6fe4731a9093166ff41d16900d22808b5a68053.tar.bz2
otp-c6fe4731a9093166ff41d16900d22808b5a68053.zip
Merge branch 'pan/unicode_error_wrong_offset' into maint
* pan/unicode_error_wrong_offset: Fix faulty rest on error in unicode:characters_to_list OTP-11080
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_unicode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index ad6f8b993a..e00440b905 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -1723,14 +1723,14 @@ static BIF_RETTYPE do_bif_utf8_to_list(Process *p,
if (b_sz) {
ErlSubBin *sb;
Eterm orig;
- ERTS_DECLARE_DUMMY(Uint offset);
+ Uint offset;
ASSERT(state != ERTS_UTF8_OK);
hp = HAlloc(p, ERL_SUB_BIN_SIZE);
sb = (ErlSubBin *) hp;
ERTS_GET_REAL_BIN(orig_bin, orig, offset, bitoffs, bitsize);
sb->thing_word = HEADER_SUB_BIN;
sb->size = b_sz;
- sb->offs = num_bytes_to_process + num_processed_bytes;
+ sb->offs = offset + num_bytes_to_process + num_processed_bytes;
sb->orig = orig;
sb->bitoffs = bitoffs;
sb->bitsize = bitsize;