]> git.eshelyaron.com Git - emacs.git/commitdiff
* lwlib/lwlib.c (lw_separator_p): Fix empty strings being separators.
authorPo Lu <luangruo@yahoo.com>
Fri, 6 May 2022 03:32:19 +0000 (11:32 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 6 May 2022 03:32:19 +0000 (11:32 +0800)
lwlib/lwlib.c

index 30546b60e511cf3d9eb1d0f5e385ecba88cee54b..863f65c915fd9f1f8909f69274b002b8a2f531e8 100644 (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;