From d3a5b4e86f431c73a92b536b049c4b16b9c226b5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 18 Jun 2014 17:03:40 +0100 Subject: coverity#706063 Unintended sign extension Change-Id: Idaec46756ef22bcec1335c219fdc3ebf64c43fc3 --- starmath/source/parse.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 2a3fba1ebb48..c78a0400a385 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2276,11 +2276,11 @@ void SmParser::Matrix() r++; } - long nRC = r * c; + size_t nRC = static_cast(r) * c; ExpressionArray.resize(nRC); - for (sal_uInt16 i = 0; i < (nRC); i++) + for (size_t i = 0; i < (nRC); ++i) { ExpressionArray[(nRC) - (i + 1)] = lcl_popOrZero(m_aNodeStack); } -- cgit