A simple code problem. Code looks roughly like this:

char buffer[ 50 ];
sprintf( ( char* )&buffer, "(%f,%f,%f,%f)", csobject.color.r,
csobject.color.g, csobject.color.b, csobject.color.a );
return gst_string_to_oop( buffer );

Returns garbage in smalltalk ( function returns OOP by the way and is
mapped with #smalltalk as return value ). As I get from the
documentation this function only "maps" the string and does not make a
copy. How can you make a real smalltalk string so the buffer can go home
after the function returns?

-- 
Yours sincerely
Plüss Roland

Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.ch/ ,
http://www.moddb.com/games/4057/epsylon )
- Game Engine: Drag(en)gine ( http://dragengine.rptd.ch ,
http://www.moddb.com/engines/9/dragengine )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to