aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-11-12 12:10:09 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-11-12 12:10:09 -0200
commit788506dd586e7da8f8593245286a4e4562c191f1 (patch)
treeece68dbba318a5892b96e73412bcbc334919a588
parent62790ab15d7fdb4ffa2b018196194d2132da3799 (diff)
downloadlua-788506dd586e7da8f8593245286a4e4562c191f1.tar.gz
lua-788506dd586e7da8f8593245286a4e4562c191f1.tar.bz2
lua-788506dd586e7da8f8593245286a4e4562c191f1.zip
detail
-rw-r--r--lstrlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 75c72f27..0300923f 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -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;