Skip to content

Commit e2010b5

Browse files
authored
Address overflow of maxSizeMB when converting from MB to bytes. (#2029)
1 parent 877bf41 commit e2010b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PerfView/CommandProcessor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,7 @@ private void WaitForRundownIdle(int minSeconds, int maxSeconds, int maxSizeMB, s
36533653
LogFile.WriteLine("Rundown File Length: {0:n1}MB delta: {1:n1}MB", newRundownFileLen / 1000000.0, delta / 1000000.0);
36543654
rundownFileLen = newRundownFileLen;
36553655

3656-
if ((maxSizeMB > 0) && rundownFileLen >= (maxSizeMB * 1024 * 1024))
3656+
if ((maxSizeMB > 0) && rundownFileLen >= ((long)maxSizeMB * 1024 * 1024))
36573657
{
36583658
LogFile.WriteLine($"Exceeded maximum rundown file size of {maxSizeMB}MB.");
36593659
break;

0 commit comments

Comments
 (0)