diff options
author | Sverker Eriksson <[email protected]> | 2014-01-14 11:25:34 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-01-29 11:08:45 +0100 |
commit | 609d835ce04a1f6320377780a11fb32382e1e419 (patch) | |
tree | 5d9e51f581093ce5dca671158756601a8e26cffc /erts/emulator/beam | |
parent | f321ea89fecdb343e58e2485c057326d08fed69c (diff) | |
download | otp-609d835ce04a1f6320377780a11fb32382e1e419.tar.gz otp-609d835ce04a1f6320377780a11fb32382e1e419.tar.bz2 otp-609d835ce04a1f6320377780a11fb32382e1e419.zip |
erts: Let enif_map_iterator_next/prev return 0 to signal end of map.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index ca82590a78..def9a7efe1 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -1771,8 +1771,8 @@ int enif_map_iterator_next(ErlNifEnv *env, ErlNifMapIterator *iter) if (iter->idx != iter->t_limit) { iter->ks++; iter->vs++; + return 1; } - return 1; } return 0; } @@ -1785,8 +1785,8 @@ int enif_map_iterator_prev(ErlNifEnv *env, ErlNifMapIterator *iter) if (iter->idx != iter->h_limit ) { iter->ks--; iter->vs--; + return 1; } - return 1; } return 0; } |