mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Fix some null argument issues.
This commit is contained in:
parent
1eb1622420
commit
f75ff2d269
2 changed files with 5 additions and 1 deletions
|
@ -106,7 +106,7 @@ COM_InitArgv (int argc, const char **argv)
|
|||
largv[com_argc] = argv[com_argc];
|
||||
if ((argv[com_argc]) && !strcmp ("-safe", argv[com_argc]))
|
||||
safe = true;
|
||||
if (com_argc)
|
||||
if (argv[com_argc])
|
||||
len += strlen (argv[com_argc]) + 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "QF/dstring.h"
|
||||
|
||||
#include "cpp.h"
|
||||
#include "diagnostic.h"
|
||||
#include "options.h"
|
||||
|
||||
typedef struct cpp_arg_s {
|
||||
|
@ -205,6 +206,9 @@ preprocess_file (const char *filename, const char *ext)
|
|||
if (cpp_name) {
|
||||
intermediate_file (tempname, filename, ext ? ext : "p", 0);
|
||||
build_cpp_args (filename, tempname->str);
|
||||
if (!cpp_argv[0]) {
|
||||
internal_error(0, "cpp_argv[0] is null");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!options.save_temps && !options.preprocess_only)
|
||||
|
|
Loading…
Reference in a new issue