summaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index b5d6b97b5..ad99dc38d 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -113,7 +113,7 @@ static void debug_print(const char *dbg, const char *buf)
if (_debug_socket != INVALID_SOCKET) {
char buf2[1024 + 32];
- snprintf(buf2, lengthof(buf2), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf);
+ seprintf(buf2, lastof(buf2), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf);
/* Sending out an error when this fails would be nice, however... the error
* would have to be send over this failing socket which won't work. */
send(_debug_socket, buf2, (int)strlen(buf2), 0);
@@ -238,10 +238,10 @@ const char *GetDebugString()
memset(dbgstr, 0, sizeof(dbgstr));
i = debug_level;
- snprintf(dbgstr, sizeof(dbgstr), "%s=%d", i->name, *i->level);
+ seprintf(dbgstr, lastof(dbgstr), "%s=%d", i->name, *i->level);
for (i++; i != endof(debug_level); i++) {
- snprintf(dbgval, sizeof(dbgval), ", %s=%d", i->name, *i->level);
+ seprintf(dbgval, lastof(dbgval), ", %s=%d", i->name, *i->level);
strecat(dbgstr, dbgval, lastof(dbgstr));
}