love.filesystem.mkdir not working
Posted: Wed Feb 11, 2009 8:44 pm
Mostly @rude
When I try to save a binary file all goes well, strings are as long as they should be, but when I call love.filesystem.write it just stops at the first NULL character ("\0"). Something I can do to prevent this?
EDIT:
When I try to save a binary file all goes well, strings are as long as they should be, but when I call love.filesystem.write it just stops at the first NULL character ("\0"). Something I can do to prevent this?
EDIT:
EDIT2: I changed the topic title because I didn't feel it was necessary to start a new thread, first post at: http://love2d.org/forum/viewtopic.php?f ... 4436#p4436 (bottom of the page )SWIG manual wrote: The char * datatype is handled as a NULL-terminated ASCII string. SWIG maps this into a 8-bit character string in the target scripting language. SWIG converts character strings in the target language to NULL terminated strings before passing them into C/C++. The default handling of these strings does not allow them to have embedded NULL bytes. Therefore, the char * datatype is not generally suitable for passing binary data. However, it is possible to change this behavior by defining a SWIG typemap. See the chapter on Typemaps for details about this.