Patch-Source: https://github.com/openresty/lua-nginx-module/commit/c9a0808c89219f74e4d20cef44a322a1bbe72df3 -- From c9a0808c89219f74e4d20cef44a322a1bbe72df3 Mon Sep 17 00:00:00 2001 From: willmafh Date: Mon, 22 May 2023 23:24:47 +0800 Subject: [PATCH] bugfix: when value type is SHDICT_TNUMBER, then it should get the number field instead of the bool field. diff --git a/src/ngx_http_lua_shdict.c b/src/ngx_http_lua_shdict.c index 2e0b04406..31bdcdb6a 100644 --- a/src/ngx_http_lua_shdict.c +++ b/src/ngx_http_lua_shdict.c @@ -654,7 +654,7 @@ ngx_http_lua_shared_dict_get(ngx_shm_zone_t *zone, u_char *key_data, return NGX_ERROR; } - ngx_memcpy(&value->value.b, data, len); + ngx_memcpy(&value->value.n, data, len); break; case SHDICT_TBOOLEAN: