mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
sample: Fix GtkDemo/DemoImages.cs on Windows
Calling .PeekChar on a binary stream can cause an ArgumentException because it tries to decode the byte.
This commit is contained in:
parent
a6c9634748
commit
233614e18b
@ -156,7 +156,7 @@ namespace GtkDemo
|
||||
pixbufLoader.AreaUpdated += new AreaUpdatedHandler (ProgressiveUpdatedCallback);
|
||||
}
|
||||
|
||||
if (imageStream.PeekChar () != -1) {
|
||||
if (imageStream.BaseStream.Position != imageStream.BaseStream.Length) {
|
||||
byte[] bytes = imageStream.ReadBytes (256);
|
||||
pixbufLoader.Write (bytes);
|
||||
return true; // leave the timeout active
|
||||
|
Loading…
Reference in New Issue
Block a user