* lwlib/lwlib.c (lw_separator_p): Fix empty strings being separators.

This commit is contained in:
Po Lu 2022-05-06 11:32:19 +08:00
parent e379d2e8c1
commit d6b5ac0f94

View file

@ -1324,10 +1324,14 @@ lw_separator_p (const char *label, enum menu_separator *type, int motif_p)
{
/* Old-style separator, maybe. It's a separator if it contains
only dashes. */
while (*label == '-')
++label;
separator_p = *label == 0;
*type = SEPARATOR_SHADOW_ETCHED_IN;
if (*label == '-')
{
while (*label == '-')
++label;
separator_p = *label == 0;
*type = SEPARATOR_SHADOW_ETCHED_IN;
}
}
return separator_p;