summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/lwlib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index 8142d92f077..f37c1058792 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -1233,8 +1233,7 @@ lw_separator_p (const char *label, enum menu_separator *type, int motif_p)
{
int separator_p = 0;
- if (strlen (label) >= 3
- && memcmp (label, "--:", 3) == 0)
+ if (strncmp (label, "--:", 3) == 0)
{
static struct separator_table
{
@@ -1276,7 +1275,7 @@ lw_separator_p (const char *label, enum menu_separator *type, int motif_p)
break;
}
}
- else if (strlen (label) > 3
+ else if (strnlen (label, 4) == 4
&& memcmp (label, "--", 2) == 0
&& label[2] != '-')
{