diff options
author | bunnei <bunneidev@gmail.com> | 2015-07-17 00:08:46 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-07-17 00:08:46 +0200 |
commit | 946f0ee2f4f5e150167ad90f86a425b50baec144 (patch) | |
tree | 47586aae7237dddc7278ef5e579cf82ad1b64e11 /src/core/loader/elf.cpp | |
parent | Merge pull request #931 from neobrain/move_default_attr_handler (diff) | |
parent | Loader: Fix variable type and remove unused variable (diff) | |
download | yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.tar yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.tar.gz yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.tar.bz2 yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.tar.lz yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.tar.xz yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.tar.zst yuzu-946f0ee2f4f5e150167ad90f86a425b50baec144.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/elf.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index ca3c18a9f..5d7264f12 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp @@ -273,7 +273,6 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { LOG_DEBUG(Loader, "%i segments:", header->e_phnum); // First pass : Get the bits into RAM - u32 segment_addr[32]; u32 base_addr = relocate ? vaddr : 0; u32 total_image_size = 0; @@ -392,15 +391,15 @@ ResultStatus AppLoader_ELF::Load() { if (is_loaded) return ResultStatus::ErrorAlreadyLoaded; - if (!file->IsOpen()) + if (!file.IsOpen()) return ResultStatus::Error; // Reset read pointer in case this file has been read before. - file->Seek(0, SEEK_SET); + file.Seek(0, SEEK_SET); - u32 size = static_cast<u32>(file->GetSize()); + size_t size = file.GetSize(); std::unique_ptr<u8[]> buffer(new u8[size]); - if (file->ReadBytes(&buffer[0], size) != size) + if (file.ReadBytes(&buffer[0], size) != size) return ResultStatus::Error; ElfReader elf_reader(&buffer[0]); |