From 1eda47d56c685c4df894c996296f498684b5aa12 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 21 Jul 2012 17:40:01 +0000 Subject: [PATCH] [BUG_FIXED] (Author: Andreas Jonsson) Fix two logic errors. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@932 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Parameters.cpp | 2 +- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 2e38c7664..0b800a27a 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -3893,7 +3893,7 @@ void NppParameters::feedScintillaParam(TiXmlNode *node) nm = element->Attribute(TEXT("borderWidth"), &val); if (nm) { - if (val > 0 || val <= 30) + if (val >= 0 && val <= 30) _svp._borderWidth = val; } } diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 0caa288f9..fbd737680 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -2264,7 +2264,11 @@ pair ScintillaEditView::getSelectionLinesRange() const range.first = execute(SCI_LINEFROMPOSITION, start); range.second = execute(SCI_LINEFROMPOSITION, end); if (range.first > range.second) - range.swap(range); + { + int temp = range.first; + range.first = range.second; + range.second = temp; + } return range; }