Commit 7710836f authored by W. Trevor King's avatar W. Trevor King
Browse files

Use integer division when calculating DynamicStringIndicesDataField count.

In Python 3, the floating point division lead to:

    Traceback (most recent call last):
      ...
      File ".../igor/struct.py", line 255, in unpack_data
        items = [next(iterator) for i in range(self.arg_count)]
    TypeError: 'numpy.float64' object cannot be interpreted as an integer
parent 93014f2b
......@@ -477,7 +477,7 @@ class DynamicStringIndicesDataField (_DynamicField):
bin_header = wave_data['bin_header']
wave_header = wave_data['wave_header']
self.string_indices_size = bin_header['sIndicesSize']
self.count = self.string_indices_size / 4
self.count = self.string_indices_size // 4
if self.count: # make sure we're in a text wave
assert TYPE_TABLE[wave_header['type']] is None, wave_header
self.setup()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment