diff options
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/WasmObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index f822d07a253..2f91a973dda 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -995,7 +995,7 @@ Error WasmObjectFile::parseDataSection(ReadContext &Ctx) { } const uint8_t *WasmObjectFile::getPtr(size_t Offset) const { - return reinterpret_cast<const uint8_t *>(getData().substr(Offset, 1).data()); + return reinterpret_cast<const uint8_t *>(getData().data() + Offset); } const wasm::WasmObjectHeader &WasmObjectFile::getHeader() const { |