]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
fix bugs (#1561)
authorA1ive <10670106+a1ive@users.noreply.github.com>
Wed, 6 Apr 2022 12:09:45 +0000 (20:09 +0800)
committerGitHub <noreply@github.com>
Wed, 6 Apr 2022 12:09:45 +0000 (20:09 +0800)
* fix bug stopping iteration when --no-floppy is used

* fix gfxmenu theme config handling bug

GRUB2/MOD_SRC/grub-2.04/grub-core/commands/search.c
GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/theme_loader.c

index 3852c0c74fc3a36ab5a7170b496ef759cfb59108..70d0fce200da51f1698a0e779103cc8928b95dac 100644 (file)
@@ -68,7 +68,7 @@ iterate_device (const char *name, void *data)
   /* Skip floppy drives when requested.  */
   if (ctx->no_floppy &&
       name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9')
   /* Skip floppy drives when requested.  */
   if (ctx->no_floppy &&
       name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9')
-    return 1;
+    return 0;
 
   if (g_no_vtoyefi_part && (grub_strcmp(name, g_vtoyefi_dosname) == 0 || grub_strcmp(name, g_vtoyefi_gptname) == 0)) {
     return 0;
 
   if (g_no_vtoyefi_part && (grub_strcmp(name, g_vtoyefi_dosname) == 0 || grub_strcmp(name, g_vtoyefi_gptname) == 0)) {
     return 0;
index 7c3c883fc041e7aa3689fea8d1107ca9a194297f..11707df4169a4854f4aad6fa04d7068dec155b8d 100644 (file)
@@ -456,7 +456,8 @@ read_expression (struct parsebuf *p)
       /* Read as a single word -- for numeric values or words without
          whitespace.  */
       start = p->pos;
       /* Read as a single word -- for numeric values or words without
          whitespace.  */
       start = p->pos;
-      while (has_more (p) && ! is_whitespace (peek_char (p)))
+      while (has_more (p) && ! is_whitespace (peek_char (p))
+             && peek_char (p) != '}')
         read_char (p);
       end = p->pos;
     }
         read_char (p);
       end = p->pos;
     }