Fix bug where a failure becomes success on x86.
am: c60f22c30e
* commit 'c60f22c30ebf16ee4ab990994535f972f349e00e':
Fix bug where a failure becomes success on x86.
diff --git a/src/aarch64/Gstep.c b/src/aarch64/Gstep.c
index 3f5e8ad..5833ce2 100644
--- a/src/aarch64/Gstep.c
+++ b/src/aarch64/Gstep.c
@@ -164,7 +164,7 @@
if (unlikely (ret == -UNW_ESTOPUNWIND))
return ret;
- if (unlikely (ret < 0))
+ if (unlikely (ret <= 0))
return 0;
return (c->dwarf.ip == 0) ? 0 : 1;
diff --git a/src/x86/Gstep.c b/src/x86/Gstep.c
index a1368eb..308f220 100644
--- a/src/x86/Gstep.c
+++ b/src/x86/Gstep.c
@@ -130,7 +130,8 @@
c->dwarf.frame++;
}
/* End of ANDROID update. */
- ret = (c->dwarf.ip == 0) ? 0 : 1;
- Debug (2, "returning %d\n", ret);
- return ret;
+ if (unlikely (ret <= 0))
+ return 0;
+
+ return (c->dwarf.ip == 0) ? 0 : 1;
}