]> git.lyx.org Git - features.git/commitdiff
* src/frontends/controllers/frontend_helpers.cpp Family name):
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 5 Jul 2007 16:11:44 +0000 (16:11 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 5 Jul 2007 16:11:44 +0000 (16:11 +0000)
- don't try to trim after a dot that is the last character in the name
  (fixes crash, bug 3981)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18992 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/frontend_helpers.cpp

index 3e1918b3c2aa370d8578960a944b1ad481bdbccd..83339e32427c6b9cc7855da0b2b69192e40483f1 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)
+       if (idx != docstring::npos && idx < fname.size() - 1)
                fname = ltrim(fname.substr(idx + 1));
        // test if we have a LaTeX Space in front
        if (fname[0] == '\\')