|
@@ -53,7 +53,11 @@ class NativeInput extends Input {
|
|
override public function readBytes(s:Bytes, pos:Int, len:Int):Int {
|
|
override public function readBytes(s:Bytes, pos:Int, len:Int):Int {
|
|
if (pos < 0 || len < 0 || pos + len > s.length)
|
|
if (pos < 0 || len < 0 || pos + len > s.length)
|
|
throw Error.OutsideBounds;
|
|
throw Error.OutsideBounds;
|
|
- var ret = stream.Read(s.getData(), pos, len);
|
|
|
|
|
|
+ var ret = 0;
|
|
|
|
+ var data = s.getData();
|
|
|
|
+ try {
|
|
|
|
+ ret = stream.Read(data, pos, len);
|
|
|
|
+ } catch (e: Dynamic) {}
|
|
if (ret == 0) {
|
|
if (ret == 0) {
|
|
_eof = true;
|
|
_eof = true;
|
|
throw new Eof();
|
|
throw new Eof();
|