1
0
Fork 0
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:
Maurus Cuelenaere 2009-07-15 15:16:55 +00:00
parent 0e5942ffea
commit be54b7f6a2
3 changed files with 5 additions and 3 deletions

View file

@ -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;
}