aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 074c23fc9..92c341d8f 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -1982,9 +1982,9 @@ long EditView::FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface,
// Modify the view style for printing as do not normally want any of the transient features to be printed
// Printing supports only the line number margin.
int lineNumberIndex = -1;
- for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
+ for (size_t margin = 0; margin < vs.ms.size(); margin++) {
if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) {
- lineNumberIndex = margin;
+ lineNumberIndex = static_cast<int>(margin);
} else {
vsPrint.ms[margin].width = 0;
}