Skip to content

Commit

Permalink
Change int.Parse to int.TryParse
Browse files Browse the repository at this point in the history
Prevent application crash by bad string passing to int.Parse by using int.TryParse instead.
  • Loading branch information
TGYK committed Jul 7, 2019
1 parent 96271fb commit fc93d6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion goesrecv-monitor/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static void DecoderLoop()

if (rsStr != "-1")
{
rsErr += int.Parse(rsStr);
int.TryParse(rsStr, out rsErr);
}
}
}
Expand Down

0 comments on commit fc93d6d

Please sign in to comment.