Browse Source

Add nullptr check before passing arg (#1825)

pull/1830/head
Tobias Mock 3 years ago
committed by GitHub
parent
commit
929fa5780d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      parser/raylib_parser.c

+ 2
- 2
parser/raylib_parser.c View File

@ -115,7 +115,7 @@ char* CharReplace(char* text, char search, char replace);
int main(int argc, char* argv[])
{
// Help
if (IsTextEqual(argv[1], "--help", 6)) {
if (argv[1] != NULL && IsTextEqual(argv[1], "--help", 6)) {
printf("Usage:\n");
printf(" raylib_parser [--json]\n");
return 0;
@ -123,7 +123,7 @@ int main(int argc, char* argv[])
// Allow changing the output format.
int outputFormat = 0;
if (IsTextEqual(argv[1], "--json", 6)) {
if (argv[1] != NULL && IsTextEqual(argv[1], "--json", 6)) {
outputFormat = JSON;
}

Loading…
Cancel
Save