mirror of
https://github.com/NishiOwO/JWasm.git
synced 2025-04-21 08:44:38 +00:00
Do not use argv[0] while parsing command line.
When using jwasm with `JWASM=/path/to/jwasm -h` argv[0] will be replaced with JWASM variable value. It leads to incorrect behaviour on NIX systems because `/` acts as a switch character while parsing command line options.
This commit is contained in:
parent
644f39971f
commit
4d3b8e80f4
2
main.c
2
main.c
@ -103,7 +103,7 @@ int main( int argc, char **argv )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ParseCmdLine() returns NULL if no source file name has been found (anymore) */
|
/* ParseCmdLine() returns NULL if no source file name has been found (anymore) */
|
||||||
while ( ParseCmdline( (const char **)argv, &numArgs ) ) {
|
while ( ParseCmdline( (const char **)&argv[1], &numArgs ) ) {
|
||||||
numFiles++;
|
numFiles++;
|
||||||
write_logo();
|
write_logo();
|
||||||
#if WILDCARDS
|
#if WILDCARDS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user