ddiakopoulos / tinyply

:earth_africa: C++11 ply 3d mesh format importer & exporter
598 stars 118 forks source link

Fix ASCII property list parsing #63

Closed BradleyMarie closed 1 year ago

BradleyMarie commented 1 year ago

Currently parsing ASCII property lists fails immediately with the exception "unexpected EOF. malformed file"

This fixes issue #59.

ddiakopoulos commented 1 year ago

@BradleyMarie thanks for the PR! I also see that someone else has a PR out https://github.com/ddiakopoulos/tinyply/pull/62 that fixes this but also makes the destSize adjustment on another line too. Could you confirm which is correct?

BradleyMarie commented 1 year ago

Since the first read is reading into &listSize, my read of the code was that setting dummyCount to zero before parsing was the correct thing to do instead of replacing sizeof(listSize) with destSize.

ddiakopoulos commented 1 year ago

LGTM thanks!

nsdfxela commented 1 year ago

"someone else" was me. let it be) Closing my p.r.