X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Flib%2Flog.qh;h=7491818b24ad309e7f0564efd5fb228326aa032c;hp=7f5bc720412348f2dcc8df053027f4de84f3e1b1;hb=1b0decb9afb829407eae763b3053a122e2ae3de6;hpb=3e21073f2bd7f282947bc1f214b3ec25d69ccae0 diff --git a/qcsrc/lib/log.qh b/qcsrc/lib/log.qh index 7f5bc7204..7491818b2 100644 --- a/qcsrc/lib/log.qh +++ b/qcsrc/lib/log.qh @@ -69,7 +69,10 @@ string(string, string...) strcat1n = #115; #define _LOG_INFO(s) \ MACRO_BEGIN { \ dprint(_LOG_HEADER("^5INFO")); \ - print("\n^7", s); \ + string __s = s; \ + print("\n^7", __s); \ + /* TODO: unconditionally add a newline when possible */ \ + if (str2chr(__s, strlen(__s) - 1) != '\n') { print("\n"); } \ } MACRO_END #define LOG_TRACE(...) _LOG_TRACE(strcat1n(__VA_ARGS__))