]> git.lyx.org Git - lyx.git/commitdiff
* src/frontend/controllers/frontend_helpers.cpp: safety fix suggested by Andre
authorMichael Schmitt <michael.schmitt@teststep.org>
Sat, 7 Jul 2007 11:19:39 +0000 (11:19 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sat, 7 Jul 2007 11:19:39 +0000 (11:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19004 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/frontend_helpers.cpp

index 83339e32427c6b9cc7855da0b2b69192e40483f1..87e2936f640d27680940a95cdc72eb6b5188f49a 100644 (file)
@@ -191,7 +191,7 @@ docstring const familyName(docstring const & name)
        if (idx != docstring::npos)
                return ltrim(fname.substr(0, idx));
        idx = fname.rfind('.');
-       if (idx != docstring::npos && idx < fname.size() - 1)
+       if (idx != docstring::npos && idx + 1 < fname.size())
                fname = ltrim(fname.substr(idx + 1));
        // test if we have a LaTeX Space in front
        if (fname[0] == '\\')