emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d6b5ac0f94 2/2: * lwlib/lwlib.c (lw_separator_p): Fix empty strin


From: Po Lu
Subject: master d6b5ac0f94 2/2: * lwlib/lwlib.c (lw_separator_p): Fix empty strings being separators.
Date: Thu, 5 May 2022 23:32:58 -0400 (EDT)

branch: master
commit d6b5ac0f949b08cab78921b1d95a47ca0a95bc36
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    * lwlib/lwlib.c (lw_separator_p): Fix empty strings being separators.
---
 lwlib/lwlib.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index 30546b60e5..863f65c915 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]