> Make sure you  blank the string at the start tag.
>
> David

Here's what's in the Traffic Manager:

  void  FGTrafficManager::data (const char * s, int len)
  {
    string token = string(s,len);
    if (( token.find(" ") == string::npos
          && (token.find('\n')) == string::npos))
    {
      value += token;
    } else {
      value = string("");
    }
  }

So, it looks like in this case value is set to the null string if the data() 
call is
passed anything with a space or carriage return in it. That seems wierd.  If 
there are
spaces in between tag delimeters that would cause a Bad Thing, it seems to me.  
I've seen
this on occasion:

<property> fdm/roll-rate </property>

Is this in bad form? Should it cause a crash, or should it be handled?

Now, going back to the function call data(), it appears that if the carriage 
return or
space is not found in the string, it is appended to a "working string".

Jon


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to