--- Steve Lamont <spl@szechuan.ucsd.edu> wrote:
>
> sprintf( buffer1, "@C%i", color );
> strncat( buffer1, buffer, 512 );
>
> where `buffer' begins with one or more digits, XForms has no way of
> knowing that it isn't all one number. It then does something stupid
> with the color index and causes the program to break.
>
> The trick I've used is to use an invalid format code to separate the
> color from the text of the line. For example:
>
> sprintf( buffer1, "@C%i@x", color );
> strncat( buffer1, buffer, 512 );
>
> should do it.
>
> There really should be some sort specific delimiter code. XForms
> should also probably check for the validity of the "@C" value and not
> barf on its shoes if it finds a bad one.
Very good point. Added some code to check for bad color specifications.
=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/