forked from len0rd/rockbox
Revert r21863 partly: fixes Lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21883 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0e5942ffea
commit
be54b7f6a2
3 changed files with 5 additions and 3 deletions
|
@ -737,7 +737,9 @@ static const char *scanformat (lua_State *L, const char *strfrmt, char *form) {
|
|||
if (isdigit(uchar(*p)))
|
||||
luaL_error(L, "invalid format (width or precision too long)");
|
||||
*(form++) = '%';
|
||||
strlcpy(form, strfrmt, p - strfrmt + 1);
|
||||
strncpy(form, strfrmt, p - strfrmt + 1);
|
||||
form += p - strfrmt + 1;
|
||||
*form = '\0';
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue