All the cool kids hard code string lengths.
Fixes issue 6090.
This commit is contained in:
parent
e73cc858bc
commit
0b34457a8e
|
@ -659,8 +659,8 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
|
|||
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
{
|
||||
int partitionNum = wxAtoi(File.SubString(10, 11));
|
||||
File.Remove(0, 12); // Remove "Partition x/"
|
||||
int partitionNum = wxAtoi(File.Mid(File.find_first_of("/"), 1));
|
||||
File.Remove(0, File.find_first_of("/") +1); // Remove "Partition x/"
|
||||
WiiDisc.at(partitionNum).FileSystem->ExportFile(WxStrToStr(File).c_str(), WxStrToStr(Path).c_str());
|
||||
}
|
||||
else
|
||||
|
@ -794,8 +794,8 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
|||
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
{
|
||||
int partitionNum = wxAtoi(Directory.SubString(10, 11));
|
||||
Directory.Remove(0, 12); // Remove "Partition x/"
|
||||
int partitionNum = wxAtoi(Directory.Mid(Directory.find_first_of("/"), 1));
|
||||
Directory.Remove(0, Directory.find_first_of("/") +1); // Remove "Partition x/"
|
||||
ExportDir(WxStrToStr(Directory).c_str(), WxStrToStr(Path).c_str(), partitionNum);
|
||||
}
|
||||
else
|
||||
|
@ -860,7 +860,7 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event)
|
|||
return;
|
||||
|
||||
// Get the partition number from the item text ("Partition N")
|
||||
int PartitionNum = wxAtoi(PartitionName.SubString(10, 11));
|
||||
int PartitionNum = wxAtoi(PartitionName.Mid(PartitionName.find_first_of("0123456789"), 1));
|
||||
const WiiPartition& Partition = WiiDisc[PartitionNum];
|
||||
|
||||
wxProgressDialog* dialog = new wxProgressDialog(
|
||||
|
|
Loading…
Reference in New Issue