commit | 51ad45c4e7c5b5f5fe795d687003c19d7eab4304 | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Fri Aug 28 18:50:31 2015 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Aug 28 18:50:31 2015 +0000 |
tree | ed62f72d638db1bce48527d3fe9ac12b18002edb | |
parent | 77992be85d9b34e9037a3ef412484747acb8bad2 [diff] | |
parent | 31bc13b266bd418ab9c46f7bf3efc564fd7d7ead [diff] |
Merge "adb: remove adisconnect in aremotesocket."
diff --git a/libutils/VectorImpl.cpp b/libutils/VectorImpl.cpp index bdb54b1..2f770f5 100644 --- a/libutils/VectorImpl.cpp +++ b/libutils/VectorImpl.cpp
@@ -198,7 +198,10 @@ _do_copy(next, curr, 1); next = curr; --j; - curr = reinterpret_cast<char*>(array) + mItemSize*(j); + curr = NULL; + if (j >= 0) { + curr = reinterpret_cast<char*>(array) + mItemSize*(j); + } } while (j>=0 && (cmp(curr, temp, state) > 0)); _do_destroy(next, 1);