FFI MemoryPointer#get_string(0, x) gets confused by null byte in the buffer
---------------------------------------------------------------------------

                 Key: JRUBY-3174
                 URL: http://jira.codehaus.org/browse/JRUBY-3174
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
         Environment: 32-bit Ubuntu Linux 8.04
            Reporter: Hongli Lai


require 'ffi'
        
p = MemoryPointer.new(:char, 15)
p.put_string(0, "hello\0world")
p p.get_string(0, 15)

# Expected         : "hello\000world\000\000\000\000"
# MRI-FFI returns  : "hello\000world\000\000\000\000"
# JRuby-FFI returns: "hello"


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to