aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/legacy/erl_marshal.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2011-01-03 16:16:54 +0100
committerBjörn-Egil Dahlberg <[email protected]>2011-01-03 16:16:54 +0100
commit095d5ebc0f739982b55b95fdd9919a6331b4b2b1 (patch)
tree4103f7ed11c37b97fbfe144d75546ae4f661fb49 /lib/erl_interface/src/legacy/erl_marshal.c
parent99372cc4053c2fa7662da2f871c9813fbf45ba7e (diff)
parentbcbe0813a0b97f86a7db354e09bf0397cf68f787 (diff)
downloadotp-095d5ebc0f739982b55b95fdd9919a6331b4b2b1.tar.gz
otp-095d5ebc0f739982b55b95fdd9919a6331b4b2b1.tar.bz2
otp-095d5ebc0f739982b55b95fdd9919a6331b4b2b1.zip
Merge branch 'vb/ei-exts' into dev
* vb/ei-exts: Fix testcases erl_global_whereis, erl_global_names Fix wrong erl_compare_ext result comparing lists Correct erl_global{register, unregister} functions Add PID (~p) type parameters to ei_format Add char (~c) type parameters to ei_format OTP-9015 Conflicts: lib/erl_interface/include/ei.h
Diffstat (limited to 'lib/erl_interface/src/legacy/erl_marshal.c')
-rw-r--r--lib/erl_interface/src/legacy/erl_marshal.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/erl_interface/src/legacy/erl_marshal.c b/lib/erl_interface/src/legacy/erl_marshal.c
index a6c2f64dd0..70949a7adf 100644
--- a/lib/erl_interface/src/legacy/erl_marshal.c
+++ b/lib/erl_interface/src/legacy/erl_marshal.c
@@ -1646,11 +1646,14 @@ static int cmp_exe2(unsigned char **e1, unsigned char **e2)
min = (i < j) ? i : j;
k = 0;
while (1) {
- if (k++ == min)
- return compare_top_ext(e1 , e2);
- if ((ret = compare_top_ext(e1 , e2)) == 0)
- continue;
- return ret;
+ if (k++ == min){
+ if (i == j) return 0;
+ if (i < j) return -1;
+ return 1;
+ }
+ if ((ret = compare_top_ext(e1 , e2)) == 0)
+ continue;
+ return ret;
}
case ERL_STRING_EXT:
i = (**e1 << 8) | ((*e1)[1]);