Skip to content

Commit d90b8ba

Browse files
committed
Fixes .net5 while stayed for ever issues
1 parent 085ea7f commit d90b8ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

itext/itext.io/itext/io/font/AdobeGlyphList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static AdobeGlyphList() {
6464
MemoryStream stream = new MemoryStream();
6565
while (true) {
6666
int size = resource.Read(buf);
67-
if (size < 0) {
67+
if (size <= 0) {
6868
break;
6969
}
7070
stream.Write(buf, 0, size);

itext/itext.io/itext/io/font/Type1Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public virtual RandomAccessFileOrArray GetMetricsFile() {
9090
}
9191
MemoryStream stream = new MemoryStream();
9292
int read;
93-
while ((read = resource.Read(buf)) >= 0) {
93+
while ((read = resource.Read(buf)) > 0) {
9494
stream.Write(buf, 0, read);
9595
}
9696
buf = stream.ToArray();

0 commit comments

Comments
 (0)