petrbroz / svf-utils

Utilities for working with the SVF file format used by Autodesk Platform Services.
https://petrbroz.github.io/svf-utils/
MIT License
129 stars 55 forks source link

Fix property offsets #6

Closed hexuallyactive closed 5 years ago

hexuallyactive commented 5 years ago

I've been having issues with this throwing out of bounds exceptions. Somewhere (can't remember which repo) I saw that the offsets were quite different, so I updated the offset method here to match.

petrbroz commented 5 years ago

Thanks @hexuallyactive, good catch! The multiply-by-two was certainly missing there. And it looks like the offset array has an additional item at the end, so you don't have to worry about offsets[dbid + 1] getting out of bounds.