]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/log.qh
Merge branch 'master' into TimePath/scrollpanel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / log.qh
index 7f5bc720412348f2dcc8df053027f4de84f3e1b1..7491818b24ad309e7f0564efd5fb228326aa032c 100644 (file)
@@ -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__))