mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:16:17 +00:00
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:
parent
85dbdefb9f
commit
9e8038303f
1 changed files with 5 additions and 0 deletions
|
@ -1494,6 +1494,8 @@ DrawInputField(ULONG FieldLength,
|
||||||
|
|
||||||
|
|
||||||
#define PARTITION_SIZE_INPUT_FIELD_LENGTH 6
|
#define PARTITION_SIZE_INPUT_FIELD_LENGTH 6
|
||||||
|
/* Restriction for MaxSize: pow(10, PARTITION_SIZE_INPUT_FIELD_LENGTH)-1 */
|
||||||
|
#define PARTITION_MAXSIZE 999999
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
ShowPartitionSizeInputBox(SHORT Left,
|
ShowPartitionSizeInputBox(SHORT Left,
|
||||||
|
@ -1692,6 +1694,9 @@ CreatePartitionPage (PINPUT_RECORD Ir)
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
MaxSize = (PartEntry->UnpartitionedLength + (1 << 19)) >> 20; /* in MBytes (rounded) */
|
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 */
|
ShowPartitionSizeInputBox (12, 14, xScreen - 12, 17, /* left, top, right, bottom */
|
||||||
MaxSize, InputBuffer, &Quit, &Cancel);
|
MaxSize, InputBuffer, &Quit, &Cancel);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue