From bb5d69345226994e5c567807489a59e0b5eca875 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Thu, 26 Sep 2019 16:19:58 -0400 Subject: [PATCH] message / format success check was short-cut. --- platform-independent/c/core/src/mpw-jni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-independent/c/core/src/mpw-jni.c b/platform-independent/c/core/src/mpw-jni.c index 28eda63e..c7265904 100644 --- a/platform-independent/c/core/src/mpw-jni.c +++ b/platform-independent/c/core/src/mpw-jni.c @@ -37,7 +37,7 @@ void mpw_log_app(LogLevel level, const char *format, ...) { if (length > 0) { char *message = malloc( length + 1 ); va_copy( _args, args ); - if (message && (length = vsnprintf( message, length + 1, format, _args )) > 0); + if (message && (length = vsnprintf( message, length + 1, format, _args )) > 0) (*env)->CallVoidMethod( env, logger, method, (*env)->NewStringUTF( env, message ) ); va_end( _args ); mpw_free( &message, (size_t)max( 0, length ) );