What am I doing wrong with "scanf" ?
When I compiled my
actuat_so
assembly file's code using
and then run
it runs good and print: but then crashes and prints:
That means printf
works just fine but scanf
is not . What am I doing wrong with scanf
then?Solution:Jump to solution
Troubleshooting Steps:
1) Verify that scanf is linked correctly and the assembly code matches the calling convention.
2) Ensure that you are aligning the stack properly before calling scanf.
3) Check if printf or other functions in your code are causing issues indirectly....
2 Replies
Solution
Troubleshooting Steps:
1) Verify that scanf is linked correctly and the assembly code matches the calling convention.
2) Ensure that you are aligning the stack properly before calling scanf.
3) Check if printf or other functions in your code are causing issues indirectly.
Thank you @Joseph Ogbonna