aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_geo_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c
index 5535eb299..bd6499ec7 100644
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -636,8 +636,8 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
range = a->elts;
- ngx_memcpy(&range[i + 2], &range[i + 1],
- (a->nelts - 2 - i) * sizeof(ngx_http_geo_range_t));
+ ngx_memcpy(&range[i + 1], &range[i],
+ (a->nelts - 1 - i) * sizeof(ngx_http_geo_range_t));
range[i + 1].start = (u_short) (e + 1);