summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-06 11:32:19 +0800
committerPo Lu <luangruo@yahoo.com>2022-05-06 11:32:19 +0800
commitd6b5ac0f949b08cab78921b1d95a47ca0a95bc36 (patch)
treefe350bc855fac5ae4d3f98c4892c98e90940303c /lwlib
parente379d2e8c18e8d9a0f859a8d90621fc898a9caf7 (diff)
downloademacs-d6b5ac0f949b08cab78921b1d95a47ca0a95bc36.tar.gz
* lwlib/lwlib.c (lw_separator_p): Fix empty strings being separators.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/lwlib.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index 30546b60e51..863f65c915f 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -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;