Index: base/setup/usetup/interface/usetup.c =================================================================== --- base/setup/usetup/interface/usetup.c (revision 74511) +++ base/setup/usetup/interface/usetup.c (working copy) @@ -27,6 +27,7 @@ */ #include +#include #include "bootsup.h" #include "chkdsk.h" @@ -1755,9 +1756,9 @@ } -#define PARTITION_SIZE_INPUT_FIELD_LENGTH 6 -/* Restriction for MaxSize: pow(10, PARTITION_SIZE_INPUT_FIELD_LENGTH)-1 */ -#define PARTITION_MAXSIZE 999999 +#define PARTITION_SIZE_INPUT_FIELD_LENGTH 9 +/* Restriction for MaxSize: pow(10, (PARTITION_SIZE_INPUT_FIELD_LENGTH - 1)) - 1 */ +#define PARTITION_MAXSIZE (pow(10, (PARTITION_SIZE_INPUT_FIELD_LENGTH - 1)) - 1) static VOID ShowPartitionSizeInputBox(SHORT Left, @@ -1853,7 +1854,7 @@ PartitionSizeBuffer); } else if ((Ir.Event.KeyEvent.uChar.AsciiChar != 0x00) && - (Index < PARTITION_SIZE_INPUT_FIELD_LENGTH)) + (Index < PARTITION_SIZE_INPUT_FIELD_LENGTH - 1)) { ch = (WCHAR)Ir.Event.KeyEvent.uChar.AsciiChar;