@@ -1115,11 +1115,8 @@ function Read_Mbr(const filename: string): tmbr;
11151115 F.Position := 0 ;
11161116 Bytesread := F.Read(Rmbr, 512 );
11171117 if bytesread <> 512 then raise Exception.Create(' error reading MBR: ' + filename);
1118- if (RMbr.Signature <> $aa55) and (Form1.CBinvalidMbr.Checked = False) then
1119- begin
1120- listboxaddscroll(form1.listbox1, ' reading mbr - wrong mbr signature: ' + filename + ' = 0x' + hexstr(RMbr.Signature, 4 ) + ' instead of 0xaa55.' );
1121- raise Exception.Create(' You can enable the checkbox "igmore invalid MBR signature" and try again' );
1122- end ;
1118+ if (RMbr.Signature <> $aa55) then
1119+ raise Exception.Create( ' reading mbr - wrong mbr signature: ' + filename + ' = 0x' + hexstr(RMbr.Signature, 4 ) + ' instead of 0xaa55.' );
11231120 finally
11241121 if assigned(F) then F.Free;
11251122 end ;
@@ -1147,11 +1144,8 @@ function Read_Mbr(const filename: string): tmbr;
11471144 F.Position := 0 ;
11481145 Bytesread := F.Read(Rmbr, 512 );
11491146 if bytesread <> 512 then raise Exception.Create(' reading mbr - error reading file: ' + filename);
1150- if (RMbr.Signature <> $aa55) and (Form1.CBinvalidMbr.Checked = False) then
1151- begin
1152- listboxaddscroll(form1.listbox1, ' reading mbr - wrong mbr signature: ' + filename + ' = 0x' + hexstr(RMbr.Signature, 4 ) + ' instead of 0xaa55.' );
1153- raise Exception.Create(' You can enable the checkbox "igmore invalid MBR signature" and try again' );
1154- end ;
1147+ if (RMbr.Signature <> $aa55) then
1148+ raise Exception.Create( ' reading mbr - wrong mbr signature: ' + filename + ' = 0x' + hexstr(RMbr.Signature, 4 ) + ' instead of 0xaa55.' );
11551149 Result := Rmbr;
11561150 finally
11571151 if assigned(F) then F.Free;
@@ -1168,11 +1162,8 @@ function Read_Mbr(const filename: string): tmbr;
11681162 Proc.Execute;
11691163 BytesRead := Proc.Output.Read(RMbr, 512 );
11701164 if bytesread <> 512 then raise Exception.Create(' reading mbr - error reading file: ' + filename);
1171- if (RMbr.Signature <> $aa55) and (Form1.CBinvalidMbr.Checked = False) then
1172- begin
1173- listboxaddscroll(form1.listbox1, ' reading mbr - wrong mbr signature: ' + filename + ' = 0x' + hexstr(RMbr.Signature, 4 ) + ' instead of 0xaa55.' );
1174- raise Exception.Create(' You can enable the checkbox "igmore invalid MBR signature" and try again' );
1175- end ;
1165+ if (RMbr.Signature <> $aa55) then
1166+ raise Exception.Create( ' reading mbr - wrong mbr signature: ' + filename + ' = 0x' + hexstr(RMbr.Signature, 4 ) + ' instead of 0xaa55.' );
11761167 Result := Rmbr;
11771168 finally
11781169 Proc.Free;
0 commit comments