Skip to content

Commit

Permalink
Fixes .net5 while stayed for ever issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkolovos committed Feb 19, 2021
1 parent 085ea7f commit d90b8ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion itext/itext.io/itext/io/font/AdobeGlyphList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static AdobeGlyphList() {
MemoryStream stream = new MemoryStream();
while (true) {
int size = resource.Read(buf);
if (size < 0) {
if (size <= 0) {
break;
}
stream.Write(buf, 0, size);
Expand Down
2 changes: 1 addition & 1 deletion itext/itext.io/itext/io/font/Type1Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public virtual RandomAccessFileOrArray GetMetricsFile() {
}
MemoryStream stream = new MemoryStream();
int read;
while ((read = resource.Read(buf)) >= 0) {
while ((read = resource.Read(buf)) > 0) {
stream.Write(buf, 0, read);
}
buf = stream.ToArray();
Expand Down

0 comments on commit d90b8ba

Please sign in to comment.