We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e85a255 + 88b3d27 commit bc414e1Copy full SHA for bc414e1
1 file changed
demo/wordpad.py
@@ -316,11 +316,10 @@ def OpenDocument(self):
316
317
buff = System.Array.CreateInstance(System.Byte, 1024)
318
data = []
319
- read = -1
320
321
- while (read != 0):
+ while stream.Position < stream.Length:
322
buff.Initialize()
323
- read = stream.Read(buff, 0, 1024)
+ stream.Read(buff, 0, 1024)
324
temp = Encoding.ASCII.GetString(buff, 0, 1024)
325
data.append(temp)
326
0 commit comments