summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index 39e7fc4f..3b56eede 100644
--- a/debug.c
+++ b/debug.c
@@ -818,7 +818,7 @@ dbgoprint(obj_t *pObj, char *fmt, ...)
lenWriteBuf = vsnprintf(pszWriteBuf, sizeof(pszWriteBuf), fmt, ap);
if(lenWriteBuf >= sizeof(pszWriteBuf)) {
/* if our buffer was too small, we simply truncate. TODO: maybe something better? */
- lenWriteBuf--;
+ lenWriteBuf = sizeof(pszWriteBuf) - 1;
}
va_end(ap);
/*
@@ -892,7 +892,7 @@ dbgprintf(char *fmt, ...)
lenWriteBuf = vsnprintf(pszWriteBuf, sizeof(pszWriteBuf), fmt, ap);
if(lenWriteBuf >= sizeof(pszWriteBuf)) {
/* if our buffer was too small, we simply truncate. TODO: maybe something better? */
- lenWriteBuf--;
+ lenWriteBuf = sizeof(pszWriteBuf) - 1;
}
va_end(ap);
/*