mirror of
https://github.com/simh/simh.git
synced 2026-03-09 12:16:13 +00:00
sim_defs.h - Make MATCH_CMD match at least one character instead of having an empty string match everything
This commit is contained in:
@@ -275,9 +275,9 @@ typedef uint32 t_addr;
|
||||
|
||||
#define SWMASK(x) (1u << (((int) (x)) - ((int) 'A')))
|
||||
|
||||
/* String match */
|
||||
/* String match - at least one character required */
|
||||
|
||||
#define MATCH_CMD(ptr,cmd) strncmp ((ptr), (cmd), strlen (ptr))
|
||||
#define MATCH_CMD(ptr,cmd) (*(ptr) && strncmp ((ptr), (cmd), strlen (ptr)))
|
||||
|
||||
/* End of Linked List/Queue value */
|
||||
/* Chosen for 2 reasons: */
|
||||
|
||||
Reference in New Issue
Block a user