summaryrefslogtreecommitdiffstats
path: root/runtime/stringbuf.c
diff options
context:
space:
mode:
authorvarmojfekoj <theinric@redhat.com>2009-03-16 15:40:03 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-03-16 15:40:03 +0100
commit16b960939ee44155a9ac6ac6999b6ab71f237034 (patch)
treeb38069bbadd5335dc56eb2c0b441327746688b89 /runtime/stringbuf.c
parente23e2e391ca1b0a5987b95f1a9f1ec8910faae8a (diff)
downloadrsyslog-16b960939ee44155a9ac6ac6999b6ab71f237034.tar.gz
rsyslog-16b960939ee44155a9ac6ac6999b6ab71f237034.tar.xz
rsyslog-16b960939ee44155a9ac6ac6999b6ab71f237034.zip
fixed bugs in RainerScript
- when converting a number and a string to a common type, both were actually converted to the other variable's type. - the value of rsCStrConvertToNumber() was miscalculated. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'runtime/stringbuf.c')
-rw-r--r--runtime/stringbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/stringbuf.c b/runtime/stringbuf.c
index 93d1e1ef..63b42348 100644
--- a/runtime/stringbuf.c
+++ b/runtime/stringbuf.c
@@ -820,7 +820,7 @@ rsCStrConvertToNumber(cstr_t *pStr, number_t *pNumber)
/* TODO: octal? hex? */
n = 0;
while(i < pStr->iStrLen && isdigit(pStr->pBuf[i])) {
- n = n * 10 + pStr->pBuf[i] * 10;
+ n = n * 10 + pStr->pBuf[i] - '0';
++i;
}