diff --git a/source/fdisk/cmd.c b/source/fdisk/cmd.c index 033328b..f71c674 100644 --- a/source/fdisk/cmd.c +++ b/source/fdisk/cmd.c @@ -327,6 +327,12 @@ void Command_Line_Delete( void ) else if ( 0 == strcmp( arg[1].choice, "LOG" ) ) { if ( ( arg[1].value >= 1 ) && ( arg[1].value <= MAX_LOGICAL_DRIVES ) && ( ( part_num = Nth_Log_Part_Defined( pDrive, arg[1].value - 1 ) ) < MAX_LOGICAL_DRIVES ) ) { + + if ( !pDrive->ext_usable ) { + /* NLS:No usable extended partition found. */ + con_print( svarlang_str( 8, 7 ) ); + exit( 9 ); + } error_code = Delete_Logical_Drive( part_num ); } else { @@ -343,6 +349,12 @@ void Command_Line_Delete( void ) } else if ( ( arg[1].value >= 5 ) && ( arg[1].value <= 28 ) && ( ( part_num = Nth_Log_Part_Defined( pDrive, arg[1].value - 5 ) ) < MAX_LOGICAL_DRIVES ) ) { + + if ( !pDrive->ext_usable ) { + /* NLS:No usable extended partition found. */ + con_print( svarlang_str( 8, 7 ) ); + exit( 9 ); + } error_code = Delete_Logical_Drive( (int)( part_num ) ); } else {