SilverGreen93 / CDPExplorer

Utility aplication for browsing, searching and extracting Trainz Assets from CDP files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to read beyond the end of the stream error

SilverGreen93 opened this issue · comments

When opening some CDP files the following error is encountered:
"Unable to read beyond the end of the stream."

Root cause:
Some float tags, in this case trainz-build, are hand-written using comma instead of dot:
trainz-build 2,4 instead of trainz-build 2.4
This translated internally to a list of float values, such as 2.0,4.0. Treat this special case by reading only the first float value and ignore the rest.