Never mind, fixed it, now I just need to fix the source of the crash.
Code:
int ProcessArgv( int argc, char **argv )
{
int a, i = -1, num = 0, err;
ECHO( l_alloc.errors, fprintf( l_alloc.errors, "ProcessArgv( %d, %p )\n", argc, (void*)argv ) );
for ( a = 0; a < argc; ++a )
{
char *arg = argv[a];
ECHO( l_alloc.errors, fprintf( l_alloc.errors, "Analysing argument '%s'\n", arg ) );
if ( !arg || arg[0] == '-' )
{
if ( num || i >= 0 )
{
err = ArgHasIssue( i, num, argv );
if ( err )
return ArgHadIssue( err, i, num, argv );
}
i = a;
num = 0;
continue;
}
++num;
}
if ( num || i >= 0 )
{
err = ArgHasIssue( i, num, argv );
if ( err )
return ArgHadIssue( err, i, num, argv );
}
return 0;
}
In case anyone wants to help me find the source of memory corruption that is causing the crash I'll be uploading my current code in a minute, I'll edit this post to contain the link after
Edit: As promised, here's the link:
Files * 148969b2657cb6a5650f6995ade9a0f133f18880 * Lee Shallis / glEngine * GitLab