Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/PPublic

Commit545dec4

Browse files
authored
Fix divide by zero exception. (#808)
1 parent65042fe commit545dec4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎Src/PChecker/CheckerCore/SystematicTesting/Strategies/Feedback/Generator/ControlledRandom.cs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ public int Next()
4545
/// <inheritdoc/>
4646
publicintNext(intmaxValue)
4747
{
48-
returnIntChoices.Next()%maxValue;
48+
if(maxValue==0)
49+
{
50+
return0;
51+
}
52+
else
53+
{
54+
returnIntChoices.Next()%maxValue;
55+
}
4956
}
5057

5158
/// <inheritdoc/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp