aboutsummaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 0ec7b4d..45cd0f2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -123,7 +123,7 @@ int buf_meth_receive(lua_State *L, p_buf buf) {
123 else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b); 123 else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b);
124 else luaL_argcheck(L, 0, 2, "invalid receive pattern"); 124 else luaL_argcheck(L, 0, 2, "invalid receive pattern");
125 /* get a fixed number of bytes */ 125 /* get a fixed number of bytes */
126 } else err = recvraw(buf, (size_t) lua_tonumber(L, 2), &b); 126 } else err = recvraw(buf, (size_t) lua_tonumber(L, 2)-size, &b);
127 /* check if there was an error */ 127 /* check if there was an error */
128 if (err != IO_DONE) { 128 if (err != IO_DONE) {
129 /* we can't push anyting in the stack before pushing the 129 /* we can't push anyting in the stack before pushing the