aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-03-19 18:16:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-03-19 18:16:12 -0300
commit1a553f9199f99bd529c542ef3be60b7a48f4ff2a (patch)
tree1401242d2d2e2fc96fd3de2034ecec84ee2eb231 /lstrlib.c
parent0ca225d33a34377d8339aa562422c0a2918891e2 (diff)
downloadlua-1a553f9199f99bd529c542ef3be60b7a48f4ff2a.tar.gz
lua-1a553f9199f99bd529c542ef3be60b7a48f4ff2a.tar.bz2
lua-1a553f9199f99bd529c542ef3be60b7a48f4ff2a.zip
better error messages
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 7d93422e..e1aee1fd 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.95 2003/03/11 12:24:34 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.96 2003/03/14 18:59:53 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*/
@@ -695,7 +695,7 @@ static int str_format (lua_State *L) {
695 char buff[MAX_ITEM]; /* to store the formatted item */ 695 char buff[MAX_ITEM]; /* to store the formatted item */
696 int hasprecision = 0; 696 int hasprecision = 0;
697 if (isdigit(uchar(*strfrmt)) && *(strfrmt+1) == '$') 697 if (isdigit(uchar(*strfrmt)) && *(strfrmt+1) == '$')
698 return luaL_error(L, "obsolete `format' option (d$)"); 698 return luaL_error(L, "obsolete option (d$) to `format'");
699 arg++; 699 arg++;
700 strfrmt = scanformat(L, strfrmt, form, &hasprecision); 700 strfrmt = scanformat(L, strfrmt, form, &hasprecision);
701 switch (*strfrmt++) { 701 switch (*strfrmt++) {
@@ -732,7 +732,7 @@ static int str_format (lua_State *L) {
732 } 732 }
733 } 733 }
734 default: { /* also treat cases `pnLlh' */ 734 default: { /* also treat cases `pnLlh' */
735 return luaL_error(L, "invalid option in `format'"); 735 return luaL_error(L, "invalid option to `format'");
736 } 736 }
737 } 737 }
738 luaL_addlstring(&b, buff, strlen(buff)); 738 luaL_addlstring(&b, buff, strlen(buff));