# HG changeset patch # User Karl Heuer # Date 796608559 0 # Node ID 620fd38579d8d6f581ccbae91dc073e3cc2fbe06 # Parent 31a046cedfc88f63343f611e30dc37c408be2be5 (sort_args): Skip strncmp if longname is a null pointer. diff -r 31a046cedfc8 -r 620fd38579d8 src/emacs.c --- a/src/emacs.c Thu Mar 30 23:38:23 1995 +0000 +++ b/src/emacs.c Fri Mar 31 00:09:19 1995 +0000 @@ -1047,8 +1047,11 @@ if (equals != 0) thislen = equals - argv[from]; - for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++) - if (!strncmp (argv[from], standard_args[i].longname, thislen)) + for (i = 0; + i < sizeof (standard_args) / sizeof (standard_args[0]); i++) + if (standard_args[i].longname + && !strncmp (argv[from], standard_args[i].longname, + thislen)) { if (match == -1) match = i;