aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/SparseVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/SparseVector.h')
-rw-r--r--src/SparseVector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SparseVector.h b/src/SparseVector.h
index f96b36b8b..20fa56cca 100644
--- a/src/SparseVector.h
+++ b/src/SparseVector.h
@@ -100,7 +100,8 @@ public:
if (partition == 0) {
// Inserting at start of document so ensure 0
if (valueCurrent != T()) {
- ClearValue(0);
+ // Since valueCurrent is needed again, should not ClearValue
+ values->SetValueAt(0, T());
starts->InsertPartition(1, 0);
values->InsertValue(1, 1, valueCurrent);
starts->InsertText(0, insertLength);