Merge pull request #32 from nubok/patch-2
Avoid undefined behavior - bp is initialized when setting up the stack
This commit is contained in:
commit
3f098f3ea8
1 changed files with 1 additions and 1 deletions
2
c4.c
2
c4.c
|
|
@ -463,7 +463,7 @@ int main(int argc, char **argv)
|
|||
if (src) return 0;
|
||||
|
||||
// setup stack
|
||||
sp = (int *)((int)sp + poolsz);
|
||||
bp = sp = (int *)((int)sp + poolsz);
|
||||
*--sp = EXIT; // call exit if main returns
|
||||
*--sp = PSH; t = sp;
|
||||
*--sp = argc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue