diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-18 17:03:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 10:26:48 +0100 |
commit | d3a5b4e86f431c73a92b536b049c4b16b9c226b5 (patch) | |
tree | aeb4272718788a5aa79d4d64390e3404b5c2716c /starmath | |
parent | 3631f5b3ba13e177e4c82af4e90b0cb5998b33e2 (diff) |
coverity#706063 Unintended sign extension
Change-Id: Idaec46756ef22bcec1335c219fdc3ebf64c43fc3
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/parse.cxx | 4 |
1 files 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<size_t>(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); } |