mirror of
https://github.com/lua/lua
synced 2025-02-08 17:23:59 +03:00
small bug: `write' must return three values in case of errors
This commit is contained in:
parent
c75c3cfd19
commit
041cb96992
5
liolib.c
5
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
|
** Standard I/O (and system) library
|
||||||
** See Copyright Notice in lua.h
|
** 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);
|
status = status && (fwrite(s, sizeof(char), l, f) == l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pushresult(L, status, NULL);
|
return pushresult(L, status, NULL);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user