]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove an extra new line prepended to LOG_INFO messages
authorterencehill <piuntn@gmail.com>
Wed, 28 Oct 2020 00:27:40 +0000 (01:27 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 28 Oct 2020 00:27:40 +0000 (01:27 +0100)
qcsrc/lib/log.qh

index 59bb70dd390c5e10436a0db7153d4c44eac71bc9..317fc8dedb363f316b359faf58369a573473cdf8 100644 (file)
@@ -71,9 +71,9 @@ string(string, string...) strcat1n = #115;
 #define  LOG_INFOF(...) _LOG_INFO(sprintf(__VA_ARGS__))
 #define _LOG_INFO(s) \
        MACRO_BEGIN \
-               if (autocvar_developer > 1) dprint(_LOG_HEADER("^5INFO")); \
+               if (autocvar_developer > 1) dprint(strcat1n(_LOG_HEADER("^5INFO"), "\n")); \
                string __s = s; \
-               print("\n^7", __s); \
+               print("^7", __s); \
                /* TODO: unconditionally add a newline when possible */ \
                if (str2chr(__s, strlen(__s) - 1) != '\n') { print("\n"); } \
        MACRO_END