aboutsummaryrefslogtreecommitdiff
path: root/iolib.c
diff options
context:
space:
mode:
authorWaldemar Celes <celes@tecgraf.puc-rio.br>1994-10-13 14:18:32 -0300
committerWaldemar Celes <celes@tecgraf.puc-rio.br>1994-10-13 14:18:32 -0300
commit6bc68d464523932a4319f34810fd3f2a3db1dc7d (patch)
tree4137a8724a63271d2627452a2414951a922361d4 /iolib.c
parentceaaa0cca8e02b102963730e8df25ac4fbe5f2dd (diff)
downloadlua-6bc68d464523932a4319f34810fd3f2a3db1dc7d.tar.gz
lua-6bc68d464523932a4319f34810fd3f2a3db1dc7d.tar.bz2
lua-6bc68d464523932a4319f34810fd3f2a3db1dc7d.zip
Acertar bug para evitar formato "%5.0s", por exemplo.
Diffstat (limited to 'iolib.c')
-rw-r--r--iolib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iolib.c b/iolib.c
index 94b2028b..e553384e 100644
--- a/iolib.c
+++ b/iolib.c
@@ -3,7 +3,7 @@
3** Input/output library to LUA 3** Input/output library to LUA
4*/ 4*/
5 5
6char *rcs_iolib="$Id: iolib.c,v 1.9 1994/09/12 19:24:31 celes Exp celes $"; 6char *rcs_iolib="$Id: iolib.c,v 1.10 1994/10/07 22:47:05 celes Exp celes $";
7 7
8#include <stdlib.h> 8#include <stdlib.h>
9#include <string.h> 9#include <string.h>
@@ -320,7 +320,7 @@ static void io_read (void)
320static void io_readuntil (void) 320static void io_readuntil (void)
321{ 321{
322 int n=255,m=0; 322 int n=255,m=0;
323 char c,d; 323 int c,d;
324 char *s; 324 char *s;
325 lua_Object lo = lua_getparam(1); 325 lua_Object lo = lua_getparam(1);
326 if (!lua_isstring(lo)) 326 if (!lua_isstring(lo))
@@ -379,7 +379,7 @@ static char *buildformat (char *e, lua_Object o)
379 char *string = &buffer[255]; 379 char *string = &buffer[255];
380 char *fstart=e, *fspace, *send; 380 char *fstart=e, *fspace, *send;
381 char t, j='r'; 381 char t, j='r';
382 int m=0, n=0, l; 382 int m=0, n=-1, l;
383 while (isspace(*e)) e++; 383 while (isspace(*e)) e++;
384 fspace = e; 384 fspace = e;
385 t = *e++; 385 t = *e++;