diff options
author | Patrik Nyblom <[email protected]> | 2010-05-10 16:27:58 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-05-17 15:51:50 +0200 |
commit | 97ab480df55cf574ab42a87b6927ef5bba83000e (patch) | |
tree | a19bfd73bfb45d772c4fd54cad13c1050a6b59a3 /erts/emulator | |
parent | dce00e268eb36048a729db9a2a9aebd4df0e7395 (diff) | |
download | otp-97ab480df55cf574ab42a87b6927ef5bba83000e.tar.gz otp-97ab480df55cf574ab42a87b6927ef5bba83000e.tar.bz2 otp-97ab480df55cf574ab42a87b6927ef5bba83000e.zip |
Add documentation for binary module
Correct behaviour of copy/2 witn 0 copies.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_bif_binary.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c index 0a40e28474..3e8480324c 100644 --- a/erts/emulator/beam/erl_bif_binary.c +++ b/erts/emulator/beam/erl_bif_binary.c @@ -2369,7 +2369,8 @@ static BIF_RETTYPE do_binary_copy(Process *p, Eterm bin, Eterm en) goto badarg; } if (!n) { - goto badarg; + Eterm res_term = erts_new_heap_binary(p,NULL,0,&bytes); + BIF_RET(res_term); } ERTS_GET_BINARY_BYTES(bin,bytes,bit_offs,bit_size); if (bit_size != 0) { |