diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-02-12 17:23:02 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-02-12 17:23:02 -0200 |
commit | bf6d2ccf92768be938aaac0a0bfc87833b793e8f (patch) | |
tree | 0d1455129fd35ea93d46a583ba814716e66fd79f /lstrlib.c | |
parent | b82ff713e321f4b65b2dc41fc1fe97633f7b197d (diff) | |
download | lua-bf6d2ccf92768be938aaac0a0bfc87833b793e8f.tar.gz lua-bf6d2ccf92768be938aaac0a0bfc87833b793e8f.tar.bz2 lua-bf6d2ccf92768be938aaac0a0bfc87833b793e8f.zip |
details
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.24 1999/02/04 19:29:51 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.25 1999/02/05 11:22:58 roberto Exp roberto $ |
3 | ** Standard library for strings and pattern-matching | 3 | ** Standard library for strings and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -471,7 +471,7 @@ static void str_format (void) { | |||
471 | else { /* format item */ | 471 | else { /* format item */ |
472 | struct Capture cap; | 472 | struct Capture cap; |
473 | char form[MAX_FORMAT]; /* to store the format ('%...') */ | 473 | char form[MAX_FORMAT]; /* to store the format ('%...') */ |
474 | char *buff; /* to store the formated item */ | 474 | char *buff; /* to store the formatted item */ |
475 | char *initf = strfrmt; | 475 | char *initf = strfrmt; |
476 | form[0] = '%'; | 476 | form[0] = '%'; |
477 | if (isdigit((unsigned char)*initf) && *(initf+1) == '$') { | 477 | if (isdigit((unsigned char)*initf) && *(initf+1) == '$') { |
@@ -505,7 +505,7 @@ static void str_format (void) { | |||
505 | long l; | 505 | long l; |
506 | char *s = luaL_check_lstr(arg, &l); | 506 | char *s = luaL_check_lstr(arg, &l); |
507 | if (cap.capture[1].len == 0 && l >= 100) { | 507 | if (cap.capture[1].len == 0 && l >= 100) { |
508 | /* no precision and string is too big to be formated; | 508 | /* no precision and string is too big to be formatted; |
509 | keep original string */ | 509 | keep original string */ |
510 | addnchar(s, l); | 510 | addnchar(s, l); |
511 | continue; /* skip the "addsize" at the end */ | 511 | continue; /* skip the "addsize" at the end */ |