mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2026-04-18 18:18:44 +00:00
Update bh_platform.c
Add check for function bh_vprintf_sgx: check whether print_function is not NULL.
This commit is contained in:
parent
74374840fa
commit
d16027ff9e
|
|
@ -60,8 +60,11 @@ int bh_printf_sgx(const char *message, ...)
|
|||
|
||||
int bh_vprintf_sgx(const char * format, va_list arg)
|
||||
{
|
||||
char msg[FIXED_BUFFER_SIZE] = { '\0' };
|
||||
vsnprintf(msg, FIXED_BUFFER_SIZE, format, arg);
|
||||
print_function(msg);
|
||||
if (print_function != NULL) {
|
||||
char msg[FIXED_BUFFER_SIZE] = { '\0' };
|
||||
vsnprintf(msg, FIXED_BUFFER_SIZE, format, arg);
|
||||
print_function(msg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user