aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bits.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-20 16:48:26 +0100
committerSverker Eriksson <[email protected]>2018-03-20 16:48:26 +0100
commit1ac8caa8d22f3767e84e7be749afbd5ed17a11b4 (patch)
tree63e0e6653e2dc0872a9c5a9a1b35246c80a4d8d9 /erts/emulator/beam/erl_bits.h
parent2bdd0ba8f6046301778ea3673716d8df9fdd42fa (diff)
downloadotp-1ac8caa8d22f3767e84e7be749afbd5ed17a11b4.tar.gz
otp-1ac8caa8d22f3767e84e7be749afbd5ed17a11b4.tar.bz2
otp-1ac8caa8d22f3767e84e7be749afbd5ed17a11b4.zip
erts: Fix some zero size sys_memcpy
Diffstat (limited to 'erts/emulator/beam/erl_bits.h')
-rw-r--r--erts/emulator/beam/erl_bits.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bits.h b/erts/emulator/beam/erl_bits.h
index b9d141d585..a3816fa820 100644
--- a/erts/emulator/beam/erl_bits.h
+++ b/erts/emulator/beam/erl_bits.h
@@ -111,7 +111,7 @@ typedef struct erl_bin_match_struct{
#define copy_binary_to_buffer(DstBuffer, DstBufOffset, SrcBuffer, SrcBufferOffset, NumBits) \
do { \
if (BIT_OFFSET(DstBufOffset) == 0 && (SrcBufferOffset == 0) && \
- (BIT_OFFSET(NumBits)==0)) { \
+ (BIT_OFFSET(NumBits)==0) && (NumBits != 0)) { \
sys_memcpy(DstBuffer+BYTE_OFFSET(DstBufOffset), \
SrcBuffer, NBYTES(NumBits)); \
} else { \