aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-12 17:23:02 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-02-12 17:23:02 -0200
commitbf6d2ccf92768be938aaac0a0bfc87833b793e8f (patch)
tree0d1455129fd35ea93d46a583ba814716e66fd79f /lstrlib.c
parentb82ff713e321f4b65b2dc41fc1fe97633f7b197d (diff)
downloadlua-bf6d2ccf92768be938aaac0a0bfc87833b793e8f.tar.gz
lua-bf6d2ccf92768be938aaac0a0bfc87833b793e8f.tar.bz2
lua-bf6d2ccf92768be938aaac0a0bfc87833b793e8f.zip
details
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 87d5ac47..eec14d34 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -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 */