mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugfix: Issue #60
This commit is contained in:
@@ -447,6 +447,9 @@ static void
|
|||||||
_get_buffer(lua_State *L, struct read_block *rb, int len) {
|
_get_buffer(lua_State *L, struct read_block *rb, int len) {
|
||||||
char tmp[len];
|
char tmp[len];
|
||||||
char * p = rb_read(rb,tmp,len);
|
char * p = rb_read(rb,tmp,len);
|
||||||
|
if (p == NULL) {
|
||||||
|
_invalid_stream(L,rb);
|
||||||
|
}
|
||||||
lua_pushlstring(L,p,len);
|
lua_pushlstring(L,p,len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user