fixes logging messages starting with '- ' when no additional information is selected

Tue, 29 May 2018 10:02:55 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 29 May 2018 10:02:55 +0200
changeset 324
343bff4cc0b5
parent 323
b8c49e7a1dba
child 325
a3e63cb21e20

fixes logging messages starting with '- ' when no additional information is selected

src/logging.c file | annotate | diff | comparison | revisions
--- a/src/logging.c	Thu May 17 11:13:02 2018 +0200
+++ b/src/logging.c	Tue May 29 10:02:55 2018 +0200
@@ -97,7 +97,9 @@
             k += sprintf(msg+k, ":%u ", line);
         }
         
-        msg[k++] = '-'; msg[k++] = ' ';
+        if (k > 0) {
+            msg[k++] = '-'; msg[k++] = ' ';
+        }
         
         va_list args;
         va_start (args, format);

mercurial