Skip to content

Commit 4c4395f

Browse files
committed
Merge pull request #4 from squire40/master
Fixed GetSentence(), again
2 parents 0dc8bfe + 00726b8 commit 4c4395f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/RandomData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public static string GetSentence(int minWords = 5, int maxWords = 25) {
232232
throw new ArgumentException("maxWords must 3 or more.", "maxWords");
233233

234234
var builder = new StringBuilder();
235-
builder.Append(UpperCaseFirstCharacter(_words[GetInt(0, _words.Length)]));
235+
builder.Append(UpperCaseFirstCharacter(_words[GetInt(0, _words.Length - 1)]));
236236
int numberOfWords = GetInt(minWords, maxWords);
237237
for (int i = 1; i < numberOfWords; i++)
238238
builder.Append(' ').Append(_words[GetInt(0, _words.Length - 1)]);

0 commit comments

Comments
 (0)