From 041cb9699284399a5068c91ced2df3f298276c0b Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 4 Dec 2002 13:17:36 -0200
Subject: small bug: `write' must return three values in case of errors

---
 liolib.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/liolib.c b/liolib.c
index 79855608..4bf2d5bc 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
 /*
-** $Id: liolib.c,v 2.24 2002/11/18 16:53:19 roberto Exp roberto $
+** $Id: liolib.c,v 2.25 2002/11/25 15:05:39 roberto Exp roberto $
 ** Standard I/O (and system) library
 ** See Copyright Notice in lua.h
 */
@@ -413,8 +413,7 @@ static int g_write (lua_State *L, FILE *f, int arg) {
       status = status && (fwrite(s, sizeof(char), l, f) == l);
     }
   }
-  pushresult(L, status, NULL);
-  return 1;
+  return pushresult(L, status, NULL);
 }
 
 
-- 
cgit v1.2.3-55-g6feb