summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libutils')
-rw-r--r--libutils/VectorImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libutils/VectorImpl.cpp b/libutils/VectorImpl.cpp
index bdb54b14a..2f770f590 100644
--- a/libutils/VectorImpl.cpp
+++ b/libutils/VectorImpl.cpp
@@ -198,7 +198,10 @@ status_t VectorImpl::sort(VectorImpl::compar_r_t cmp, void* state)
198 _do_copy(next, curr, 1); 198 _do_copy(next, curr, 1);
199 next = curr; 199 next = curr;
200 --j; 200 --j;
201 curr = reinterpret_cast<char*>(array) + mItemSize*(j); 201 curr = NULL;
202 if (j >= 0) {
203 curr = reinterpret_cast<char*>(array) + mItemSize*(j);
204 }
202 } while (j>=0 && (cmp(curr, temp, state) > 0)); 205 } while (j>=0 && (cmp(curr, temp, state) > 0));
203 206
204 _do_destroy(next, 1); 207 _do_destroy(next, 1);