Ampere K. Hardraade wrote:
> Andy Ross wrote:
> > Is there some sample code to exhibit the problem?
> Do you mean something like this?
Yup, that will do it. :)
You're right. The property system does not support arbitrary byte
arrays in the string value. The SGPropertyNode::setStringValue()
interface supports only C strings (a char* with no length), which are
always nul terminated.
This isn't fixable without relatively major surgery, so for now I
think you're stuck. Maybe Melchior's suggestion of storing your data
in Nasal space is the best one for the moment.
Also, a note about your sample code: the strc() function is
semi-deprecated. The current Nasal interpreter allows you to get the
byte in a string using just str[i] instead of strc(str, i). The
strc() interface is likely to come back as part of a utf8 package for
doing multibyte handling, but for single bytes you should probably be
using the array index notation.
Flightgear-devel mailing list