diff options
author | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-10-13 14:18:32 -0300 |
---|---|---|
committer | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-10-13 14:18:32 -0300 |
commit | 6bc68d464523932a4319f34810fd3f2a3db1dc7d (patch) | |
tree | 4137a8724a63271d2627452a2414951a922361d4 /iolib.c | |
parent | ceaaa0cca8e02b102963730e8df25ac4fbe5f2dd (diff) | |
download | lua-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Input/output library to LUA | 3 | ** Input/output library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_iolib="$Id: iolib.c,v 1.9 1994/09/12 19:24:31 celes Exp celes $"; | 6 | char *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) | |||
320 | static void io_readuntil (void) | 320 | static 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++; |