Skip to content
This repository was archived by the owner on Mar 27, 2020. It is now read-only.

Commit 60085e8

Browse files
authored
Merge pull request #33 from grandsilence/master
Fix #30.2 Fix rounding in ChallengeSolution.ClearanceQuery
2 parents c8192f0 + 5931de6 commit 60085e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CloudFlareUtilities/ChallengeSolution.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public ChallengeSolution(string clearancePage, string verificationCode, string p
2424

2525
public double Answer { get; }
2626

27-
public string ClearanceQuery => $"{ClearancePage}?jschl_vc={VerificationCode}&pass={Pass}&jschl_answer={Answer.ToString(CultureInfo.InvariantCulture)}";
27+
// Using .ToString("R") to reduse answer rounding
28+
public string ClearanceQuery => $"{ClearancePage}?jschl_vc={VerificationCode}&pass={Pass}&jschl_answer={Answer.ToString("R", CultureInfo.InvariantCulture)}";
2829

2930
public static bool operator ==(ChallengeSolution solutionA, ChallengeSolution solutionB)
3031
{

0 commit comments

Comments
 (0)