mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 13:18:20 +00:00
fix(c-api) Fix how string's length is computed.
Obviously, it's just `feature.size`. Why did I do that…?
This commit is contained in:
@@ -300,7 +300,7 @@ pub unsafe extern "C" fn wasm_cpu_features_add(
|
||||
let feature = c_try!(
|
||||
str::from_utf8(slice::from_raw_parts(
|
||||
feature.data,
|
||||
feature.size + 1,
|
||||
feature.size,
|
||||
));
|
||||
otherwise false
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user