lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 43cff79bf70aa227f99b5f381b9a39465567c092
parent 95c314439342d3919b4ac8b6b84902d683cfee8d
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Sun, 21 Jun 2015 10:50:04 -0300

detail

Diffstat:
Mliolib.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/liolib.c b/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);