summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-04-05 13:07:22 +0000
committerLRN <lrn1986@gmail.com>2013-04-05 13:07:22 +0000
commit79a877eec22507265bbc5cc704b2402210ac1afd (patch)
treeffa54042ae33e7c841d6dcc4d23d4a4bba6897c1
parentf47fed8e1a5763ab4b36cd19ab4cecbe22a3d281 (diff)
Don't wcscmp a NULL pointer
-rw-r--r--src/util/w32cat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/w32cat.c b/src/util/w32cat.c
index 4f56ba58e..b9b783ad7 100644
--- a/src/util/w32cat.c
+++ b/src/util/w32cat.c
@@ -84,7 +84,7 @@ main (int argc, char **argv)
for (i = 1; i < argcw || argcw == 1; i++)
{
DWORD r, w;
- int is_dash = wcscmp (argvw[i], L"-") == 0;
+ int is_dash = wcscmp (NULL == argvw[i] ? L"-" : argvw[i], L"-") == 0;
if (argcw == 1 || is_dash)
{
stdi = GetStdHandle (STD_INPUT_HANDLE);