提交 aa71ec3d 编写于 作者: S Steven Barth 提交者: Rich Felker

getsubopt: don't include leading = in value string

getsubopt incorrectly returns the delimiting = in the value string,
this patch fixes it by increasing the pointer position by one.
Signed-off-by: NSteven Barth <cyrus@openwrt.org>
上级 5a9c8c05
......@@ -15,7 +15,7 @@ int getsubopt(char **opt, char *const *keys, char **val)
size_t l = strlen(keys[i]);
if (strncmp(keys[i], s, l)) continue;
if (s[l] == '=')
*val = s + l;
*val = s + l + 1;
else if (s[l]) continue;
return i;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册