[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_1_BRANCH: kdegraphics/kdvi
From: Stefan Kebekus <stefan.kebekus () uni-bayreuth ! de>
Date: 2002-12-20 2:04:33
[Download RAW message or body]
CVS commit by kebekus:
fixes crash when backwards searching
M +4 -5 dviwin_textsearch.cpp 1.3.2.1
--- kdegraphics/kdvi/dviwin_textsearch.cpp #1.3:1.3.2.1
@@ -91,5 +91,5 @@ void dviWindow::findNextText(void)
// Go trough the text of the current page and search for the
// string.
- for(int i=DVIselection.selectedTextStart+1; i<textLinkList.size(); i++)
+ for(unsigned int i=DVIselection.selectedTextStart+1; i<textLinkList.size(); i++)
if (textLinkList[i].linkText.find(searchText, 0, case_sensitive) >= 0) {
// Restore the previous settings, including the current
@@ -219,6 +218,6 @@ void dviWindow::findPrevText(void)
int i=DVIselection.selectedTextStart-1;
if (i < 0)
- i = textLinkList.size();
- do{
+ i = textLinkList.size()-1;
+ while(i >= 0) {
if (textLinkList[i].linkText.find(searchText, 0, case_sensitive) >= 0) {
// Restore the previous settings, including the current
@@ -234,5 +233,5 @@ void dviWindow::findPrevText(void)
}
i--;
- }while(i >= 0);
+ }
current_page--;
DVIselection.clear();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic