From 16b960939ee44155a9ac6ac6999b6ab71f237034 Mon Sep 17 00:00:00 2001 From: varmojfekoj Date: Mon, 16 Mar 2009 15:40:03 +0100 Subject: 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 --- runtime/stringbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/stringbuf.c') 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; } -- cgit v1.2.3