summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r--patchoat/patchoat.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index aaa3e8339f..460e4e05f4 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -630,7 +630,7 @@ bool PatchOat::Patch(const std::string& image_location,
std::string image_relocation_filename =
output_image_relocation_directory
+ (android::base::StartsWith(original_image_filename, "/") ? "" : "/")
- + original_image_filename.substr(original_image_filename.find_last_of("/"));
+ + original_image_filename.substr(original_image_filename.find_last_of('/'));
int64_t input_image_size = input_image->GetLength();
if (input_image_size < 0) {
LOG(ERROR) << "Error while getting input image size";