diff options
-rw-r--r-- | segmenttree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/segmenttree.c b/segmenttree.c index 449f8e7..418c78e 100644 --- a/segmenttree.c +++ b/segmenttree.c @@ -18,7 +18,7 @@ void build(sqlite3_stmt *stmt, int l, int r, int n) { /* Update value at index x*/ void update(int x, int v, int l, int r, int n) { if (l == r) { - seg[n] += v; + seg[n] = v; return; } int m = l + r >> 1; |