]> git.kaiwu.me - nginx.git/commitdiff
fix range deletion
authorIgor Sysoev <igor@sysoev.ru>
Fri, 16 Jan 2009 16:02:30 +0000 (16:02 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 16 Jan 2009 16:02:30 +0000 (16:02 +0000)
src/http/modules/ngx_http_geo_module.c

index 5dfa58f4d1f1ecd6beffd4e0edb736d30bcb89d9..0b20b30929749f5e3f9c83a8e45ef27e300f53c7 100644 (file)
@@ -699,6 +699,9 @@ ngx_http_geo_delete_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
             {
                 ngx_memcpy(&range[i], &range[i + 1],
                            (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
+
+                a->nelts--;
+
                 break;
             }