File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 22
33- ` PhpException ` no longer requires a lifetime [ #80 ] .
44- Added ` PhpException ` and ` PhpResult ` to prelude [ #80 ] .
5+ - Fixed ` ZendString ` missing last character [ #82 ] .
56
67[ #80 ] : https://github.com/davidcole1340/ext-php-rs/pull/80
8+ [ #82 ] : https://github.com/davidcole1340/ext-php-rs/pull/82
79
810## Version 0.5.0
911
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ impl ZendStr {
5454 pub fn as_c_str ( & self ) -> & CStr {
5555 // SAFETY: Zend strings store their readable length in a fat pointer.
5656 unsafe {
57- let slice = slice:: from_raw_parts ( self . val . as_ptr ( ) as * const u8 , self . len ( ) ) ;
57+ let slice = slice:: from_raw_parts ( self . val . as_ptr ( ) as * const u8 , self . len ( ) + 1 ) ;
5858 CStr :: from_bytes_with_nul_unchecked ( slice)
5959 }
6060 }
You can’t perform that action at this time.
0 commit comments