Skip to content

Commit e7ed054

Browse files
committed
Merge branch 'develop' into release-2.1
2 parents 8455a42 + bc414e1 commit e7ed054

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

demo/wordpad.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,10 @@ def OpenDocument(self):
316316

317317
buff = System.Array.CreateInstance(System.Byte, 1024)
318318
data = []
319-
read = -1
320319

321-
while (read != 0):
320+
while stream.Position < stream.Length:
322321
buff.Initialize()
323-
read = stream.Read(buff, 0, 1024)
322+
stream.Read(buff, 0, 1024)
324323
temp = Encoding.ASCII.GetString(buff, 0, 1024)
325324
data.append(temp)
326325

0 commit comments

Comments
 (0)