[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
This commit is contained in:
Don Ho 2012-07-21 17:40:01 +00:00
parent 8d4f1a36c5
commit 1eda47d56c
2 changed files with 6 additions and 2 deletions

View File

@ -3893,7 +3893,7 @@ void NppParameters::feedScintillaParam(TiXmlNode *node)
nm = element->Attribute(TEXT("borderWidth"), &val); nm = element->Attribute(TEXT("borderWidth"), &val);
if (nm) if (nm)
{ {
if (val > 0 || val <= 30) if (val >= 0 && val <= 30)
_svp._borderWidth = val; _svp._borderWidth = val;
} }
} }

View File

@ -2264,7 +2264,11 @@ pair<int, int> ScintillaEditView::getSelectionLinesRange() const
range.first = execute(SCI_LINEFROMPOSITION, start); range.first = execute(SCI_LINEFROMPOSITION, start);
range.second = execute(SCI_LINEFROMPOSITION, end); range.second = execute(SCI_LINEFROMPOSITION, end);
if (range.first > range.second) if (range.first > range.second)
range.swap(range); {
int temp = range.first;
range.first = range.second;
range.second = temp;
}
return range; return range;
} }