Skip to content

Commit 3f36bd4

Browse files
committed
Fix overflow for large files
This fix was contributed by @cdcseacave. #83
1 parent 9c92534 commit 3f36bd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plyfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ def _read_array(stream, dtype, n):
14111411
If `n` elements could not be read.
14121412
"""
14131413
try:
1414-
size = int(_np.dtype(dtype).itemsize * n)
1414+
size = int(_np.dtype(dtype).itemsize) * int(n)
14151415
return _np.frombuffer(stream.read(size), dtype)
14161416
except Exception:
14171417
raise StopIteration

0 commit comments

Comments
 (0)