openbsd-ports/editors/scintilla/patches/patch-src_Editor_cxx
steven 134affccfd upgrade to 1.72
based on diffs from new maintainer Jeremy Evans <jeremyevans0 at gmail.com>
2007-01-18 10:56:27 +00:00

26 lines
1.1 KiB
Plaintext

$OpenBSD: patch-src_Editor_cxx,v 1.2 2007/01/18 10:56:27 steven Exp $
--- src/Editor.cxx.orig Thu Jan 18 08:42:00 2007
+++ src/Editor.cxx Thu Jan 18 08:42:00 2007
@@ -1848,10 +1848,10 @@ void Editor::PaintSelMargin(Surface *sur
char number[100];
number[0] = '\0';
if (firstSubLine)
- sprintf(number, "%d", lineDoc + 1);
+ snprintf(number, sizeof(number), "%d", lineDoc + 1);
if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) {
int lev = pdoc->GetLevel(lineDoc);
- sprintf(number, "%c%c %03X %03X",
+ snprintf(number, sizeof(number), "%c%c %03X %03X",
(lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_',
(lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_',
lev & SC_FOLDLEVELNUMBERMASK,
@@ -3255,7 +3255,7 @@ long Editor::FormatRange(bool draw, Rang
(ypos + vsPrint.lineHeight <= pfr->rc.bottom) &&
(visibleLine >= 0)) {
char number[100];
- sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1);
+ snprintf(number, sizeof(number), "%d" lineNumberPrintSpace, lineDoc + 1);
PRectangle rcNumber = rcLine;
rcNumber.right = rcNumber.left + lineNumberWidth;
// Right justify