fix(runtime-c-api) wasmer_last_error_message returns the length + 1.

Returning the error message's length + 1 mimics the
`wasmer_last_error_length` function that counts the trailing null
byte.
This commit is contained in:
Ivan Enderlin 2019-05-10 16:00:13 +02:00
parent 1d555301f7
commit 7d2721ef7a

View File

@ -85,7 +85,7 @@ pub unsafe extern "C" fn wasmer_last_error_message(buffer: *mut c_char, length:
// accidentally read into garbage.
buffer[error_message.len()] = 0;
error_message.len() as c_int
error_message.len() as c_int + 1
}
#[derive(Debug)]