diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-11-12 12:10:09 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-11-12 12:10:09 -0200 |
commit | 788506dd586e7da8f8593245286a4e4562c191f1 (patch) | |
tree | ece68dbba318a5892b96e73412bcbc334919a588 | |
parent | 62790ab15d7fdb4ffa2b018196194d2132da3799 (diff) | |
download | lua-788506dd586e7da8f8593245286a4e4562c191f1.tar.gz lua-788506dd586e7da8f8593245286a4e4562c191f1.tar.bz2 lua-788506dd586e7da8f8593245286a4e4562c191f1.zip |
detail
-rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.137 2007/10/25 19:30:36 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.138 2007/10/29 15:51:10 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -732,7 +732,7 @@ static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { | |||
732 | if (isdigit(uchar(*p))) | 732 | if (isdigit(uchar(*p))) |
733 | luaL_error(L, "invalid format (width or precision too long)"); | 733 | luaL_error(L, "invalid format (width or precision too long)"); |
734 | *(form++) = '%'; | 734 | *(form++) = '%'; |
735 | strncpy(form, strfrmt, p - strfrmt + 1); | 735 | memcpy(form, strfrmt, p - strfrmt + 1); |
736 | form += p - strfrmt + 1; | 736 | form += p - strfrmt + 1; |
737 | *form = '\0'; | 737 | *form = '\0'; |
738 | return p; | 738 | return p; |