diff --git a/firmware/target/hosted/android/debug-android.c b/firmware/target/hosted/android/debug-android.c index 6d77ac411b..d819bde3cb 100644 --- a/firmware/target/hosted/android/debug-android.c +++ b/firmware/target/hosted/android/debug-android.c @@ -26,6 +26,7 @@ #include #include #include +#include #define LOG_TAG "Rockbox" @@ -42,10 +43,10 @@ void debugf(const char *fmt, ...) void ldebugf(const char* file, int line, const char *fmt, ...) { va_list ap; - char buf[1024]; + char buf[strlen(fmt) + 8]; snprintf(buf, sizeof(buf), "%s:%d %s", file, line, fmt); va_start(ap, fmt); - __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG " L", buf, ap); + __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG, buf, ap); va_end(ap); }