|
@@ -344,7 +344,7 @@ pub extern "C" fn strtok(s1: *mut c_char, delimiter: *const c_char) -> *mut c_ch
|
|
let token = HAYSTACK;
|
|
let token = HAYSTACK;
|
|
HAYSTACK = strpbrk(token, delimiter);
|
|
HAYSTACK = strpbrk(token, delimiter);
|
|
if !HAYSTACK.is_null() {
|
|
if !HAYSTACK.is_null() {
|
|
- HAYSTACK.write(0 as c_char);
|
|
|
|
|
|
+ HAYSTACK.write(0);
|
|
HAYSTACK = HAYSTACK.add(1);
|
|
HAYSTACK = HAYSTACK.add(1);
|
|
} else {
|
|
} else {
|
|
HAYSTACK = ptr::null_mut();
|
|
HAYSTACK = ptr::null_mut();
|