Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
c9b316a7
Commit
c9b316a7
authored
Oct 21, 2020
by
longpanda
Browse files
Fix bug for VTOY_DEFAULT_IMAGE in TreeView mode when VTOY_DEFAULT_SEARCH_ROOT was set.
parent
1ba23bcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
+17
-1
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
View file @
c9b316a7
...
@@ -1736,6 +1736,7 @@ static int ventoy_set_default_menu(void)
...
@@ -1736,6 +1736,7 @@ static int ventoy_set_default_menu(void)
char
*
pos
=
NULL
;
char
*
pos
=
NULL
;
char
*
end
=
NULL
;
char
*
end
=
NULL
;
char
*
def
=
NULL
;
char
*
def
=
NULL
;
const
char
*
strdata
=
NULL
;
img_info
*
cur
=
NULL
;
img_info
*
cur
=
NULL
;
img_info
*
default_node
=
NULL
;
img_info
*
default_node
=
NULL
;
const
char
*
default_image
=
NULL
;
const
char
*
default_image
=
NULL
;
...
@@ -1773,7 +1774,22 @@ static int ventoy_set_default_menu(void)
...
@@ -1773,7 +1774,22 @@ static int ventoy_set_default_menu(void)
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"set default=%c"
,
'\''
);
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"set default=%c"
,
'\''
);
pos
=
def
+
1
;
strdata
=
ventoy_get_env
(
"VTOY_DEFAULT_SEARCH_ROOT"
);
if
(
strdata
&&
strdata
[
0
]
==
'/'
)
{
pos
=
def
+
grub_strlen
(
strdata
);
if
(
*
pos
==
'/'
)
{
pos
++
;
}
}
else
{
pos
=
def
+
1
;
}
pos
=
def
+
1
;
while
((
end
=
grub_strchr
(
pos
,
'/'
))
!=
NULL
)
while
((
end
=
grub_strchr
(
pos
,
'/'
))
!=
NULL
)
{
{
*
end
=
0
;
*
end
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment