Return error if trying to create images with negative or overflow sectors on formats that don't support them.

This commit is contained in:
2025-10-24 02:13:08 +01:00
parent cf988b9d63
commit d706fbfc3f
32 changed files with 5639 additions and 8140 deletions

View File

@@ -58,6 +58,20 @@ public sealed partial class DriDiskCopy
return false;
}
if(negativeSectors != 0)
{
ErrorMessage = Localization.Negative_sectors_are_not_supported;
return false;
}
if(overflowSectors != 0)
{
ErrorMessage = Localization.Overflow_sectors_are_not_supported;
return false;
}
if(sectors > ushort.MaxValue)
{
ErrorMessage = Localization.Too_many_sectors;