Skip to content

Commit

Permalink
*actually* fixed chunked reconstitution
Browse files Browse the repository at this point in the history
  • Loading branch information
adamharrison committed Jan 17, 2025
1 parent 5e31990 commit 848f4c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,7 @@ static int lpm_extract(lua_State* L) {
lua_pushnil(L);
lua_newtable(L);
} else {
// We leave this table on teh stack, because buffer functions can add unknowable amounts of stuff until luaL_pushresult is used.
lua_rawgeti(L, LUA_REGISTRYINDEX, context->lua_buffer);
size_t len = lua_rawlen(L, -1);
luaL_Buffer b;
Expand All @@ -1683,7 +1684,6 @@ static int lpm_extract(lua_State* L) {
lua_pop(L, 1);
luaL_addlstring(&b, str, str_len);
}
lua_pop(L, 1);
luaL_pushresult(&b);
lua_newtable(L);
}
Expand Down

0 comments on commit 848f4c2

Please sign in to comment.