Details (more uniformity in error messages)

This commit is contained in:
Roberto Ierusalimschy
2020-05-27 11:46:47 -03:00
parent efcf24be0c
commit aa8d4a782d
3 changed files with 15 additions and 15 deletions

View File

@@ -476,7 +476,7 @@ static void *resizebox (lua_State *L, int idx, size_t newsize) {
UBox *box = (UBox *)lua_touserdata(L, idx);
void *temp = allocf(ud, box->box, box->bsize, newsize);
if (temp == NULL && newsize > 0) /* allocation error? */
luaL_error(L, "not enough memory for buffer allocation");
luaL_error(L, "not enough memory");
box->box = temp;
box->bsize = newsize;
return temp;