summaryrefslogtreecommitdiffhomepage
path: root/parser
diff options
context:
space:
mode:
authorTobias Mock <[email protected]>2021-06-13 11:52:24 +0200
committerGitHub <[email protected]>2021-06-13 11:52:24 +0200
commit929fa5780da0230f4e20bb45549f91d23f8e700d (patch)
tree7ee08cebdcdc0e444062bc6a9fe8a2a41b84998a /parser
parent7d03048f1d3864990b6bd19d24038d011f925f67 (diff)
downloadraylib-929fa5780da0230f4e20bb45549f91d23f8e700d.tar.gz
raylib-929fa5780da0230f4e20bb45549f91d23f8e700d.zip
Add nullptr check before passing arg (#1825)
Diffstat (limited to 'parser')
-rw-r--r--parser/raylib_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser/raylib_parser.c b/parser/raylib_parser.c
index 751e0cad..f2f3109f 100644
--- a/parser/raylib_parser.c
+++ b/parser/raylib_parser.c
@@ -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;
}