1
0
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:
Mark Pizzolato
2012-11-06 16:40:06 -08:00
parent 3e78dc6732
commit c9b31427b4

View File

@@ -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: */