aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2017-10-15 09:05:57 +1100
committerZufu Liu <unknown>2017-10-15 09:05:57 +1100
commitb3352da038cb3869640f942d94fc158d1af73a9c (patch)
tree09a467046f79bfcce36b85f2be24b7bae593499a
parent0a31ccc204add2c40bad3432bfe9a1fe2fc7b54e (diff)
downloadscintilla-mirror-b3352da038cb3869640f942d94fc158d1af73a9c.tar.gz
Backport: Bug [#1978]. Minor undefined behaviour fixed.
Backport of changeset 6398:2db0528f34b5.
-rw-r--r--doc/ScintillaHistory.html4
-rw-r--r--src/ViewStyle.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 9a684f608..30d4e1140 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -593,6 +593,10 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1919/">Bug #1919</a>.
</li>
<li>
+ Minor undefined behaviour fixed.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1978">Bug #1978</a>.
+ </li>
+ <li>
On Cocoa, improve scrolling on macOS 10.12.
<a href="http://sourceforge.net/p/scintilla/bugs/1885">Bug #1885</a>.
</li>
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 70419569b..c2d5effcd 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -192,7 +192,7 @@ void ViewStyle::CalculateMarginWidthAndMask() {
}
maskDrawInText = 0;
for (int markBit = 0; markBit < 32; markBit++) {
- const int maskBit = 1 << markBit;
+ const int maskBit = 1U << markBit;
switch (markers[markBit].markType) {
case SC_MARK_EMPTY:
maskInLine &= ~maskBit;