Skip to content

Commit

Permalink
Address overflow of maxSizeMB when converting from MB to bytes. (#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianrob authored May 2, 2024
1 parent 877bf41 commit e2010b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PerfView/CommandProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3653,7 +3653,7 @@ private void WaitForRundownIdle(int minSeconds, int maxSeconds, int maxSizeMB, s
LogFile.WriteLine("Rundown File Length: {0:n1}MB delta: {1:n1}MB", newRundownFileLen / 1000000.0, delta / 1000000.0);
rundownFileLen = newRundownFileLen;

if ((maxSizeMB > 0) && rundownFileLen >= (maxSizeMB * 1024 * 1024))
if ((maxSizeMB > 0) && rundownFileLen >= ((long)maxSizeMB * 1024 * 1024))
{
LogFile.WriteLine($"Exceeded maximum rundown file size of {maxSizeMB}MB.");
break;
Expand Down

0 comments on commit e2010b5

Please sign in to comment.