mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-27 21:14:21 +01:00
Check argc
This commit is contained in:
parent
081efa8f26
commit
8d210497a3
@ -487,7 +487,7 @@ int main(int argc, char *argv[])
|
|||||||
strncpy(arg_filename, argv[2], sizeof(arg_filename));
|
strncpy(arg_filename, argv[2], sizeof(arg_filename));
|
||||||
strncpy(GCSettings.LoadFolder, dir.c_str(), sizeof(GCSettings.LoadFolder));
|
strncpy(GCSettings.LoadFolder, dir.c_str(), sizeof(GCSettings.LoadFolder));
|
||||||
OpenGameList();
|
OpenGameList();
|
||||||
strncpy(GCSettings.Exit_Dol_File, argv[3] != NULL ? argv[3] : "", sizeof(GCSettings.Exit_Dol_File));
|
strncpy(GCSettings.Exit_Dol_File, argc > 3 && argv[3] != NULL ? argv[3] : "", sizeof(GCSettings.Exit_Dol_File));
|
||||||
if(argc > 5 && argv[4] != NULL && argv[5] != NULL)
|
if(argc > 5 && argv[4] != NULL && argv[5] != NULL)
|
||||||
{
|
{
|
||||||
sscanf(argv[4], "%08x", &GCSettings.Exit_Channel[0]);
|
sscanf(argv[4], "%08x", &GCSettings.Exit_Channel[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user