sscanf is a cdecl function; we must restore the stack after calling it, or
we will restore the wrong value for %edi.
Signed-off-by: Zebediah Figura
---
mingw-w64-crt/stdio/scanf.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/mingw-w64-crt/stdio/scanf.S b/mingw-w64-crt/stdio/scanf.S
index 3a0e977a..061d2cb6 100644
--- a/mingw-w64-crt/stdio/scanf.S
+++ b/mingw-w64-crt/stdio/scanf.S
@@ -162,6 +162,7 @@ __argtos:
/* Make the call. */
call *20(%ebp)
+addl $(iOffset + iBytes), %esp
/* Restore stack. */
popl %edi
--
2.20.1
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public