mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-06 22:48:30 +01:00
Fix a couple of bugs where we generate incorrect minidump files on Linux.o
Patch by Markus Gutschke <markus@chromium.org>. R=thestig Review URL: http://breakpad.appspot.com/150001 Review URL: http://breakpad.appspot.com/155001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@649 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
3a69e0e1d1
commit
f5c8f6fb61
4 changed files with 310 additions and 30 deletions
|
|
@ -148,6 +148,24 @@ class wasteful_vector {
|
|||
return used_;
|
||||
}
|
||||
|
||||
void resize(unsigned sz, T c = T()) {
|
||||
// No need to test "sz >= 0", as "sz" is unsigned.
|
||||
if (sz <= used_) {
|
||||
used_ = sz;
|
||||
} else {
|
||||
unsigned a = allocated_;
|
||||
if (sz > a) {
|
||||
while (sz > a) {
|
||||
a *= 2;
|
||||
}
|
||||
Realloc(a);
|
||||
}
|
||||
while (sz > used_) {
|
||||
a_[used_++] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T& operator[](size_t index) {
|
||||
return a_[index];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue