mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Fixes #567, ReadShort now casts to and returns an ushort
This commit is contained in:
parent
c024e6abd0
commit
aeb08744cb
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user