mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
detail
This commit is contained in:
parent
95c3144393
commit
43cff79bf7
1 changed files with 2 additions and 2 deletions
4
liolib.c
4
liolib.c
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: liolib.c,v 2.143 2015/03/06 19:09:08 roberto Exp roberto $
|
||||
** $Id: liolib.c,v 2.144 2015/04/03 18:41:57 roberto Exp roberto $
|
||||
** Standard I/O (and system) library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -483,7 +483,7 @@ static void read_all (lua_State *L, FILE *f) {
|
|||
luaL_Buffer b;
|
||||
luaL_buffinit(L, &b);
|
||||
do { /* read file in chunks of LUAL_BUFFERSIZE bytes */
|
||||
char *p = luaL_prepbuffsize(&b, LUAL_BUFFERSIZE);
|
||||
char *p = luaL_prepbuffer(&b);
|
||||
nr = fread(p, sizeof(char), LUAL_BUFFERSIZE, f);
|
||||
luaL_addsize(&b, nr);
|
||||
} while (nr == LUAL_BUFFERSIZE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue