diff options
author | John Högberg <[email protected]> | 2017-09-22 14:55:12 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-09-22 14:55:12 +0200 |
commit | 18e249e61b1c4f831632ebabe0e22f8c636955c6 (patch) | |
tree | 419a09f5d18032da19b346d18c78fe5a4bd24cfa /erts/emulator/beam/erl_io_queue.c | |
parent | f5e6967723770e1dbd664f6b348628e7a709a51a (diff) | |
parent | ae559453fed714fecd4284c7a4332bc2c8483c29 (diff) | |
download | otp-18e249e61b1c4f831632ebabe0e22f8c636955c6.tar.gz otp-18e249e61b1c4f831632ebabe0e22f8c636955c6.tar.bz2 otp-18e249e61b1c4f831632ebabe0e22f8c636955c6.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/erl_io_queue.c')
-rw-r--r-- | erts/emulator/beam/erl_io_queue.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_io_queue.c b/erts/emulator/beam/erl_io_queue.c index a01b676d39..190ba6bbb9 100644 --- a/erts/emulator/beam/erl_io_queue.c +++ b/erts/emulator/beam/erl_io_queue.c @@ -973,9 +973,10 @@ static int iol2v_append_binary(iol2v_state_t *state, Eterm bin_term) { UWord binary_size; Uint byte_offset, bit_offset, bit_size; + byte *binary_data; + Eterm *parent_header; Eterm parent_binary; - byte *binary_data; ASSERT(state->bytereds_available > state->bytereds_spent); @@ -1001,14 +1002,14 @@ static int iol2v_append_binary(iol2v_state_t *state, Eterm bin_term) { erts_emasculate_writable_binary(pb); } - binary_data = pb->bytes; + binary_data = &((byte*)pb->bytes)[byte_offset]; } else { ErlHeapBin *hb = (ErlHeapBin*)parent_header; ASSERT(thing_subtag(*parent_header) == HEAP_BINARY_SUBTAG); ASSERT(is_bin_small); - binary_data = &((unsigned char*)&hb->data)[byte_offset]; + binary_data = &((byte*)&hb->data)[byte_offset]; } if (!is_bin_small && (state->acc_size == 0 || !is_acc_small)) { |