From fab26b99f15b5cdba5868270768f819100ee3d47 Mon Sep 17 00:00:00 2001 From: sbird Date: Tue, 6 Dec 2022 15:59:59 +0100 Subject: [PATCH] [fix] DebugPrintf with no format arguments --- include/gba/isagbprint.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gba/isagbprint.h b/include/gba/isagbprint.h index 91aa9f214e..493c6604bc 100644 --- a/include/gba/isagbprint.h +++ b/include/gba/isagbprint.h @@ -29,17 +29,17 @@ void AGBPrintInit(void); #if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) -#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, __VA_ARGS__) +#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__) #define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram) #elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT) -#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, __VA_ARGS__) +#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__) #define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram) #else // Default to AGBPrint -#define DebugPrintf(pBuf, ...) AGBPrintf(const char *pBuf, ...) +#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__) #define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram) #endif