mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-27 13:14:26 -04:00
[core] fix a crash when an image is selected with no target device
* Closes #405
This commit is contained in:
parent
6b433c7fc0
commit
c56d1a0545
2 changed files with 10 additions and 9 deletions
|
@ -580,7 +580,8 @@ BOOL AnalyzeMBR(HANDLE hPhysicalDrive, const char* TargetName)
|
|||
int i;
|
||||
|
||||
fake_fd._ptr = (char*)hPhysicalDrive;
|
||||
fake_fd._bufsiz = SelectedDrive.Geometry.BytesPerSector;
|
||||
// Must be set to 512, as we also use this method for images and we may not have a target UFD yet
|
||||
fake_fd._bufsiz = 512;
|
||||
|
||||
if (!is_br(&fake_fd)) {
|
||||
uprintf("%s does not have an x86 %s\n", TargetName, mbr_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue