aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-07-01 08:22:39 +1000
committerZufu Liu <unknown>2019-07-01 08:22:39 +1000
commitcef4f7e4feb91ff9d4ba1d9ee411a86bd2af6a16 (patch)
tree88f4df2e0b88ae921909ef3645a93d6ad7d4636f
parent2a15b94200abe8ee0df2dddc296f3dafd55655f8 (diff)
downloadscintilla-mirror-cef4f7e4feb91ff9d4ba1d9ee411a86bd2af6a16.tar.gz
Backport: Bug [#2115]. Fix undefined behaviour of shifting signed 1 by 31.
Backport of changeset 7614:74b2c724a1df.
-rw-r--r--src/MarginView.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/MarginView.cxx b/src/MarginView.cxx
index e6f73c52a..a9a5cdb7e 100644
--- a/src/MarginView.cxx
+++ b/src/MarginView.cxx
@@ -267,7 +267,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc,
const bool firstSubLine = visibleLine == firstVisibleLine;
const bool lastSubLine = visibleLine == lastVisibleLine;
- int marks = model.pdoc->GetMark(lineDoc);
+ unsigned int marks = model.pdoc->GetMark(lineDoc);
if (!firstSubLine)
marks = 0;
@@ -284,7 +284,7 @@ void MarginView::PaintMargin(Surface *surface, Sci::Line topLine, PRectangle rc,
if (levelNum < levelNextNum) {
if (model.pcs->GetExpanded(lineDoc)) {
if (levelNum == SC_FOLDLEVELBASE)
- marks |= 1 << SC_MARKNUM_FOLDEROPEN;
+ marks |= 1U << SC_MARKNUM_FOLDEROPEN;
else
marks |= 1 << folderOpenMid;
} else {