You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code makes function main() call itself recursively, causing a stack/heap collision.
The reason is that Func() is defined without the public specifier and the function is not called directly, so the compiler doesn't generate any code for it, thinking it's unused. But because Func() has a public specifier in its declaration, the compiler still creates an entry for this function in the public functions table.
As a result, since there's no code for Func(), the entry points at main() instead, which causes recursion.
Minimal complete verifiable example (MCVE):
See above.
Workspace Information:
Compiler version: 3.2.3664, 3.10.10
Command line arguments provided (or sampctl version):