/[pcsx2_0.9.7]/trunk/pcsx2/Elfheader.cpp
ViewVC logotype

Diff of /trunk/pcsx2/Elfheader.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 280 by william, Thu Dec 23 12:02:12 2010 UTC revision 283 by william, Thu Dec 23 12:39:52 2010 UTC
# Line 260  void ElfObject::readFile() Line 260  void ElfObject::readFile()
260          if (rsize < data.GetSizeInBytes()) throw Exception::EndOfStream(filename);          if (rsize < data.GetSizeInBytes()) throw Exception::EndOfStream(filename);
261  }  }
262    
263  void ElfObject::checkElfSize(s64 elfsize)  static wxString GetMsg_InvalidELF()
264  {  {
265          if (elfsize > 0xfffffff)          return
266                  throw Exception::BadStream(filename).SetBothMsgs(wxLt("Illegal ELF file size over 2GB!"));                  _("Cannot load ELF binary image.  The file may be corrupt or incomplete.") +
267                    wxString(L"\n\n") +
268                    _("If loading from an ISO image, this error may be caused by an unsupported ISO image type or bug in PCSX2 ISO image support.");
269    }
270    
271    
272          if (elfsize == -1)  void ElfObject::checkElfSize(s64 elfsize)
273                  throw Exception::BadStream(filename).SetBothMsgs(wxLt("ELF file does not exist!"));  {
274            const wxChar* diagMsg = NULL;
275            if              (elfsize > 0xfffffff)   diagMsg = L"Illegal ELF file size over 2GB!";
276            else if (elfsize == -1)                 diagMsg = L"ELF file does not exist!";
277            else if (elfsize == 0)                  diagMsg = L"Unexpected end of ELF file.";
278    
279          if (elfsize == 0)          if (diagMsg)
280                  throw Exception::BadStream(filename).SetBothMsgs(wxLt("Unexpected end of ELF file."));                  throw Exception::BadStream(filename)
281                            .SetDiagMsg(diagMsg)
282                            .SetUserMsg(GetMsg_InvalidELF());
283  }  }
284    
285  u32 ElfObject::getCRC()  u32 ElfObject::getCRC()

Legend:
Removed from v.280  
changed lines
  Added in v.283

  ViewVC Help
Powered by ViewVC 1.1.22