diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-12-04 13:17:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-12-04 13:17:36 -0200 |
commit | 041cb9699284399a5068c91ced2df3f298276c0b (patch) | |
tree | d0fdb227f73cda12b284b868e994e5be90f6f9c8 /liolib.c | |
parent | c75c3cfd19e807ba00c353da47dc49139e873b18 (diff) | |
download | lua-041cb9699284399a5068c91ced2df3f298276c0b.tar.gz lua-041cb9699284399a5068c91ced2df3f298276c0b.tar.bz2 lua-041cb9699284399a5068c91ced2df3f298276c0b.zip |
small bug: `write' must return three values in case of errors
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.24 2002/11/18 16:53:19 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.25 2002/11/25 15:05:39 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -413,8 +413,7 @@ static int g_write (lua_State *L, FILE *f, int arg) { | |||
413 | status = status && (fwrite(s, sizeof(char), l, f) == l); | 413 | status = status && (fwrite(s, sizeof(char), l, f) == l); |
414 | } | 414 | } |
415 | } | 415 | } |
416 | pushresult(L, status, NULL); | 416 | return pushresult(L, status, NULL); |
417 | return 1; | ||
418 | } | 417 | } |
419 | 418 | ||
420 | 419 | ||