diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-12-06 19:24:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-12-06 21:09:47 +0100 |
commit | 8bc85cd8a6a9a879c143d8defacc45967a0ac99e (patch) | |
tree | 6983b2675550cc9b956afc0a03251d724953ff32 /sc/source | |
parent | 243c05ac27e3ffd94343630e668a53cf3ad18744 (diff) |
signed-integer-overflow
...after 8406139062d9ffe1daed32aefe4e261c6c55d63e "process broadcasts for
adjacent cells together (tdf#119083)" during e.g.
CppunitTest_sc_ucalc_copypaste,
> sc/source/core/data/documen7.cxx:143:59: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Change-Id: If848747f6b004219475b39b48c6a3de086bd1ae7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126457
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/documen7.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index bf0d38cb4ec9..28941db7c6d9 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -140,10 +140,10 @@ bool ScDocument::BroadcastHintInternal( const ScHint& rHint ) const ScAddress address(rHint.GetStartAddress()); SvtBroadcaster* pLastBC = nullptr; // Process all broadcasters for the given row range. - for( SCROW nRow = address.Row(); nRow < address.Row() + rHint.GetRowCount(); ++nRow ) + for( SCROW nRow = 0; nRow < rHint.GetRowCount(); ++nRow ) { ScAddress a(address); - a.SetRow(nRow); + a.SetRow(address.Row() + nRow); SvtBroadcaster* pBC = GetBroadcaster(a); if ( pBC && pBC != pLastBC ) { |