diff options
Diffstat (limited to 'src/event_buffer.c')
-rw-r--r-- | src/event_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/event_buffer.c b/src/event_buffer.c index 9d7b182..546a596 100644 --- a/src/event_buffer.c +++ b/src/event_buffer.c @@ -78,6 +78,8 @@ static int event_buffer_add(lua_State* L) { for(i = 2; i <= last; i++) { if(!lua_isstring(L, i) && !is_event_buffer(L, i)) luaL_argerror(L, i, "Argument is not a string or buffer object"); + if(lua_equal(L, 1, i)) + luaL_argerror(L, i, "Cannot add buffer to itself"); /* Optionally perform checks and data loading separately to avoid overfilling the buffer */ #if BUFFER_ADD_CHECK_INPUT_FIRST } |