Per spec, if mouthbreather calls longjmp(buf, 0), return 1 instead

This commit is contained in:
nattthebear 2016-03-26 17:14:44 -04:00
parent 559d029e2c
commit a029e60cfc
2 changed files with 13 additions and 1 deletions

View File

@ -248,6 +248,15 @@
<envvars />
<debugger />
<lib_finder disable_auto="1" />
<DoxyBlocks>
<comment_style block="0" line="0" />
<doxyfile_project />
<doxyfile_build />
<doxyfile_warnings />
<doxyfile_output />
<doxyfile_dot />
<general />
</DoxyBlocks>
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@ -34,7 +34,10 @@ setjmp:
longjmp:
movq %rsi, %rax /* Return value */
test %rax, %rax
jnz L0
inc %rax /* if 0 was passed, send back 1 instead */
L0:
movq 8 (%rdi), %rbp
cli