aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_unicode.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-05-02 15:48:55 +0200
committerPatrik Nyblom <[email protected]>2013-05-02 16:09:55 +0200
commit0ebffb2b55bd1870bfbe0ea47aa94017d7917084 (patch)
tree9a383178aa463c7d2aeb8c8434c52fbe54a2a330 /erts/emulator/beam/erl_unicode.c
parentcd14a151051567cc19dfa3677799612366060801 (diff)
downloadotp-0ebffb2b55bd1870bfbe0ea47aa94017d7917084.tar.gz
otp-0ebffb2b55bd1870bfbe0ea47aa94017d7917084.tar.bz2
otp-0ebffb2b55bd1870bfbe0ea47aa94017d7917084.zip
Fix faulty rest on error in unicode:characters_to_list
Diffstat (limited to 'erts/emulator/beam/erl_unicode.c')
-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;