]> git.lyx.org Git - lyx.git/blobdiff - src/TexRow.cpp
* src/insets/InsetNote.h:
[lyx.git] / src / TexRow.cpp
index 635be479f0fbeba8548b9eedeffc34d6e594616a..6d88ba614140050f78702b4ecf0144e1e16c24b2 100644 (file)
@@ -13,7 +13,8 @@
 #include <config.h>
 
 #include "TexRow.h"
-#include "debug.h"
+
+#include "support/debug.h"
 
 #include <algorithm>
 
@@ -46,7 +47,7 @@ void TexRow::newline()
 
 bool TexRow::getIdFromRow(int row, int & id, int & pos) const
 {
-       if (row <= 0 || row > rowlist.size()) {
+       if (row <= 0 || row > int(rowlist.size())) {
                id = -1;
                pos = 0;
                return false;
@@ -73,6 +74,8 @@ int TexRow::getRowFromIdPos(int id, int pos) const
                } else if (foundid)
                        break;
        }
+       if (!foundid)
+               return rowlist.size();
        return bestrow;
 }