summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/shared/System/Number.Formatting.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mscorlib/shared/System/Number.Formatting.cs b/src/mscorlib/shared/System/Number.Formatting.cs
index 74395ab2f5..387fe0193c 100644
--- a/src/mscorlib/shared/System/Number.Formatting.cs
+++ b/src/mscorlib/shared/System/Number.Formatting.cs
@@ -1974,13 +1974,14 @@ namespace System
if (groupDigits != null)
{
int groupSizeIndex = 0; // Index into the groupDigits array.
- int groupSizeCount = groupDigits[groupSizeIndex]; // The current total of group size.
int bufferSize = digPos; // The length of the result buffer string.
int groupSize = 0; // The current group size.
// Find out the size of the string buffer for the result.
if (groupDigits.Length != 0) // You can pass in 0 length arrays
{
+ int groupSizeCount = groupDigits[groupSizeIndex]; // The current total of group size.
+
while (digPos > groupSizeCount)
{
groupSize = groupDigits[groupSizeIndex];