提交 503c8230 编写于 作者: M Martin Walch 提交者: Yann E. MORIN

kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len

The struct gstr has a capacity that may differ from the actual string length.

However, a string manipulation in the function search_conf made the assumption
that it is the same, which led to messing up some search results, especially
when the content of the gstr in use had not yet reached at least 63 chars.
Signed-off-by: NMartin Walch <walch.martin@web.de>
Acked-by: NWang YanQing <udknight@gmail.com>
Acked-by: NBenjamin Poirier <bpoirier@suse.de>
Reviewed-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: N"Yann E. MORIN" <yann.morin.1998@free.fr>
上级 33819600
......@@ -584,7 +584,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
for (j = 4; --i >= 0; j += 2) {
menu = submenu[i];
if (head && location && menu == location)
jump->offset = r->len - 1;
jump->offset = strlen(r->s);
str_printf(r, "%*c-> %s", j, ' ',
_(menu_get_prompt(menu)));
if (menu->sym) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册