Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PR2 segfault when compiling with clang and -O2 #143

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ intptr_t QDECL VM_Call( vm_t *vm, int nargs, int callnum, ... )
if ( vm->entryPoint )
{
//rcg010207 - see dissertation at top of VM_DllSyscall() in this file.
int args[MAX_VMMAIN_CALL_ARGS-1];
int args[MAX_VMMAIN_CALL_ARGS-1] = {0};
va_list ap;
va_start( ap, callnum );
for ( i = 0; i < nargs; i++ ) {
Expand All @@ -1467,7 +1467,7 @@ intptr_t QDECL VM_Call( vm_t *vm, int nargs, int callnum, ... )
#endif
r = VM_CallInterpreted2( vm, nargs+1, (int*)&callnum );
#else
int args[MAX_VMMAIN_CALL_ARGS];
int args[MAX_VMMAIN_CALL_ARGS] = {0};
va_list ap;

args[0] = callnum;
Expand Down