Fixed a comparison operator; so that the NULL at the end of argv[] is copied by InitCmdLine().
Most POSIX function libraries hid that long-time bug by putting zeroes in their dynamic RAM; but, MinGW's library doesn't do it. Therefore, a command like cl65 foo.c -l would crash with a "Segmentation fault" -- it should give a nice error message about "-l"; and, quit neatly.
This commit is contained in:
@@ -71,7 +71,7 @@ struct LongOpt {
|
||||
|
||||
|
||||
|
||||
void InitCmdLine (int* aArgCount, char** aArgVec[], const char* aProgName);
|
||||
void InitCmdLine (int* aArgCount, char*** aArgVec, const char* aProgName);
|
||||
/* Initialize command line parsing. aArgVec is the argument array terminated by
|
||||
** a NULL pointer (as usual), ArgCount is the number of valid arguments in the
|
||||
** array. Both arguments are remembered in static storage.
|
||||
|
||||
Reference in New Issue
Block a user