Mikhail Zvyozdochkink <mzvyozd@narod.ru>

- Limit inputable max partition size to 999999 Mbs.
See issue #3356 for more details.

svn path=/trunk/; revision=34001
This commit is contained in:
Aleksey Bragin 2008-06-17 18:42:20 +00:00
parent 85dbdefb9f
commit 9e8038303f

View file

@ -1494,6 +1494,8 @@ DrawInputField(ULONG FieldLength,
#define PARTITION_SIZE_INPUT_FIELD_LENGTH 6
/* Restriction for MaxSize: pow(10, PARTITION_SIZE_INPUT_FIELD_LENGTH)-1 */
#define PARTITION_MAXSIZE 999999
static VOID
ShowPartitionSizeInputBox(SHORT Left,
@ -1692,6 +1694,9 @@ CreatePartitionPage (PINPUT_RECORD Ir)
while (TRUE)
{
MaxSize = (PartEntry->UnpartitionedLength + (1 << 19)) >> 20; /* in MBytes (rounded) */
if (MaxSize > PARTITION_MAXSIZE) MaxSize = PARTITION_MAXSIZE;
ShowPartitionSizeInputBox (12, 14, xScreen - 12, 17, /* left, top, right, bottom */
MaxSize, InputBuffer, &Quit, &Cancel);