tnbytes may be up to max int

This commit is contained in:
Cinder
2016-09-25 09:58:24 -05:00
parent 757d6fa262
commit 7b3ca5b8fe

View File

@@ -299,7 +299,7 @@ namespace CSJ2K.j2k.codestream.reader
{
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
tnbytes = (int) (trate * hd.MaxCompImgWidth * hd.MaxCompImgHeight) / 8;
if (tnbytes < 0) tnbytes = int.MaxValue;
if (tnbytes <= 0) tnbytes = int.MaxValue;
}
isTruncMode = !pl.getBooleanParameter("parsing");
@@ -2727,4 +2727,4 @@ namespace CSJ2K.j2k.codestream.reader
return ccb;
}
}
}
}