setjmp() must return 1 when a 0 value has been passed to longjmp().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-05-09 18:22:01 +00:00
parent 370fc8c907
commit e4d9ef0e7c

View File

@ -19,6 +19,12 @@ FUNCTION(_longjmp):
mov 4(%esp), %ecx
mov 8(%esp), %eax
/* If value is 0, setjmp() must return 1. */
test %eax, %eax
mov $1, %eax
jnz 1f
1:
// restore registers
mov JMP_REGS_EBX(%ecx), %ebx
mov JMP_REGS_ESI(%ecx), %esi