diff --git a/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs b/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs index e992cad6..9309377c 100644 --- a/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs +++ b/CSJ2K/j2k/codestream/reader/FileBitstreamReaderAgent.cs @@ -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; } } -} \ No newline at end of file +}