src/Pure/System/isabelle_process.scala
changeset 39731 5cb0d7b0d601
parent 39632 6328e7a06f32
child 40848 8662b9b1f123
     1.1 --- a/src/Pure/System/isabelle_process.scala	Mon Sep 27 18:10:21 2010 +0200
     1.2 +++ b/src/Pure/System/isabelle_process.scala	Mon Sep 27 18:11:33 2010 +0200
     1.3 @@ -335,8 +335,8 @@
     1.4          var m = 0
     1.5          do {
     1.6            m = stream.read(buf, i, n - i)
     1.7 -          i += m
     1.8 -        } while (m > 0 && n > i)
     1.9 +          if (m != -1) i += m
    1.10 +        } while (m != -1 && n > i)
    1.11  
    1.12          if (i != n) throw new Protocol_Error("bad message chunk content")
    1.13