mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-01-18 19:51:24 +08:00
Fixes #567, ReadShort now casts to and returns an ushort
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
private static short ReadShort(Stream stream, byte[] buffer)
|
||||
private static ushort ReadShort(Stream stream, byte[] buffer)
|
||||
{
|
||||
var read = stream.Read(buffer, 0, 2);
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
throw new InvalidOperationException("Failed to read a short where expected in the JPEG stream.");
|
||||
}
|
||||
|
||||
return (short)((buffer[0] << 8) + buffer[1]);
|
||||
return (ushort)((buffer[0] << 8) + buffer[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user