summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-10-25 04:56:24 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-25 04:56:24 +0200
commit776651cc5b2d4db207139c27664e5a021b6c5273 (patch)
tree04a9f465e311d37eb6a892a92b9c3dab9f2627cf
parentShrink all recovery loop images with zopflipng (diff)
parentMerge "applypatch: Fix the bug when constructing VAL_BLOB." am: e1991428ba (diff)
downloadandroid_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.tar
android_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.tar.gz
android_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.tar.bz2
android_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.tar.lz
android_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.tar.xz
android_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.tar.zst
android_bootable_recovery-776651cc5b2d4db207139c27664e5a021b6c5273.zip
-rw-r--r--applypatch/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/applypatch/main.cpp b/applypatch/main.cpp
index a3a45d06f..294f7ee21 100644
--- a/applypatch/main.cpp
+++ b/applypatch/main.cpp
@@ -99,7 +99,7 @@ static int PatchMode(int argc, char** argv) {
return 1;
}
bonus.type = VAL_BLOB;
- bonus.data = reinterpret_cast<const char*>(bonusFc.data.data());
+ bonus.data = std::string(bonusFc.data.cbegin(), bonusFc.data.cend());
argc -= 2;
argv += 2;
}
@@ -132,7 +132,8 @@ static int PatchMode(int argc, char** argv) {
std::vector<Value> patches;
std::vector<Value*> patch_ptrs;
for (size_t i = 0; i < files.size(); ++i) {
- patches.push_back(Value(VAL_BLOB, reinterpret_cast<const char*>(files[i].data.data())));
+ patches.push_back(Value(VAL_BLOB,
+ std::string(files[i].data.cbegin(), files[i].data.cend())));
patch_ptrs.push_back(&patches[i]);
}
return applypatch(argv[1], argv[2], argv[3], target_size,