aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-08-16 17:47:59 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-08-16 17:47:59 +0200
commit42b7313906eda8e651f87decddfb18753ff576a4 (patch)
tree4b86dcd875d92f318eacdaf4317047702b435447
parent2434a7416550bc20b450327f9b9578babf7b1e09 (diff)
cache: fix bug
Change-Id: Ie1d65068f962335b46bd2ca259a002eb559db83c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c
index 3b98c1e..ca4234a 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -91,7 +91,7 @@ drop_at(
l = itemat(cache, pos)->length;
e = pos + l;
cache->used -= l;
- if (cache->used > e)
+ if (cache->used > pos)
memmove(&cache->content[pos], &cache->content[e], cache->used - pos);
}