From 22d0d7056206e3158fe6cdbe82c9508b2f41da29 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 15 Mar 2009 21:21:15 +0100 Subject: make CSS_MAX_STR_LEN a static const integer --- src/cssparser.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/cssparser.cc') diff --git a/src/cssparser.cc b/src/cssparser.cc index 349e4ce6..5b41c490 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -426,7 +426,7 @@ void CssParser::nextToken() // handle negative numbers if (c == '-') { - if (i < CSS_MAX_STR_LEN - 1) + if (i < maxStrLen - 1) tval[i++] = c; c = getc(); } @@ -434,7 +434,7 @@ void CssParser::nextToken() if (isdigit(c)) { ttype = CSS_TK_DECINT; do { - if (i < CSS_MAX_STR_LEN - 1) { + if (i < maxStrLen - 1) { tval[i++] = c; } /* else silently truncated */ @@ -450,10 +450,10 @@ void CssParser::nextToken() c = getc(); if (isdigit(c)) { ttype = CSS_TK_FLOAT; - if (i < CSS_MAX_STR_LEN - 1) + if (i < maxStrLen - 1) tval[i++] = '.'; do { - if (i < CSS_MAX_STR_LEN - 1) + if (i < maxStrLen - 1) tval[i++] = c; /* else silently truncated */ c = getc(); @@ -492,7 +492,7 @@ void CssParser::nextToken() i = 1; c = getc(); while (isalnum(c) || c == '_' || c == '-') { - if (i < CSS_MAX_STR_LEN - 1) { + if (i < maxStrLen - 1) { tval[i] = c; i++; } /* else silently truncated */ @@ -534,7 +534,7 @@ void CssParser::nextToken() } } - if (i < CSS_MAX_STR_LEN - 1) { + if (i < maxStrLen - 1) { tval[i] = c; i++; } /* else silently truncated */ @@ -556,7 +556,7 @@ void CssParser::nextToken() i = 1; c = getc(); while (isxdigit(c)) { - if (i < CSS_MAX_STR_LEN - 1) { + if (i < maxStrLen - 1) { tval[i] = c; i++; } /* else silently truncated */ -- cgit v1.2.3