diff options
author | rubidium <rubidium@openttd.org> | 2014-04-23 21:12:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-04-23 21:12:09 +0000 |
commit | 5b82822c12e014771dceaf9d909e1c0f3653c5a9 (patch) | |
tree | 1cf02e076eb61eb94d9064c7cb02bbe85ecb9a6c /src/debug.cpp | |
parent | ef4c2ce0317ae583e837722b6a41ea44cd83da71 (diff) | |
download | openttd-5b82822c12e014771dceaf9d909e1c0f3653c5a9.tar.xz |
(svn r26486) -Codechange: replace a number of snprintfs with seprintf
Diffstat (limited to 'src/debug.cpp')
-rw-r--r-- | src/debug.cpp | 6 |
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)); } |