summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-10-02 15:29:34 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-10-02 15:29:34 +0200
commit1ec858244efc4265fa5fa4c797c006a82ca52308 (patch)
treea0bed8c3cdf3c81562525b212d627e1538d3196b /runtime
parent9812a2af8c308c1b29bc0b5604593595a66dd25d (diff)
downloadrsyslog-1ec858244efc4265fa5fa4c797c006a82ca52308.tar.gz
rsyslog-1ec858244efc4265fa5fa4c797c006a82ca52308.tar.xz
rsyslog-1ec858244efc4265fa5fa4c797c006a82ca52308.zip
bugfix: subseconds where not correctly extracted from a timestamp
if that timestamp did not contain any subsecond information (the resulting string was garbagge but should have been "0", what it now is).
Diffstat (limited to 'runtime')
-rw-r--r--runtime/datetime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/datetime.c b/runtime/datetime.c
index 6d5652ff..aeb5fac5 100644
--- a/runtime/datetime.c
+++ b/runtime/datetime.c
@@ -534,7 +534,7 @@ int formatTimestampSecFrac(struct syslogTime *ts, char* pBuf, size_t iLenBuf)
lenRet = snprintf(pBuf, iLenBuf, szFmtStr, ts->secfrac);
} else {
pBuf[0] = '0';
- pBuf[1] = '1';
+ pBuf[1] = '\0';
lenRet = 1;
}