diff options
| -rw-r--r-- | lstrlib.c | 8 |
1 files changed, 3 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.58 2000/11/24 17:39:56 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.59 2000/12/04 14:43:06 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 | */ |
| @@ -585,10 +585,8 @@ static int str_format (lua_State *L) { | |||
| 585 | char form[MAX_FORMAT]; /* to store the format (`%...') */ | 585 | char form[MAX_FORMAT]; /* to store the format (`%...') */ |
| 586 | char buff[MAX_ITEM]; /* to store the formatted item */ | 586 | char buff[MAX_ITEM]; /* to store the formatted item */ |
| 587 | int hasprecision = 0; | 587 | int hasprecision = 0; |
| 588 | if (isdigit((unsigned char)*strfrmt) && *(strfrmt+1) == '$') { | 588 | if (isdigit((unsigned char)*strfrmt) && *(strfrmt+1) == '$') |
| 589 | arg = *strfrmt - '0'; | 589 | lua_error(L, "obsolete `format' option (d$)"); |
| 590 | strfrmt += 2; /* skip the `n$' */ | ||
| 591 | } | ||
| 592 | arg++; | 590 | arg++; |
| 593 | strfrmt = scanformat(L, strfrmt, form, &hasprecision); | 591 | strfrmt = scanformat(L, strfrmt, form, &hasprecision); |
| 594 | switch (*strfrmt++) { | 592 | switch (*strfrmt++) { |
