From b91e1c1b09f445ae1570aa39596e3ac2eaf4203a Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Fri, 7 Sep 2007 00:17:08 -0400 Subject: event_buffer:add learned not to append to itself... --- src/event_buffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 } -- cgit v1.2.3