]> git.lyx.org Git - features.git/commitdiff
fix crash with error inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 20 Apr 2001 13:18:09 +0000 (13:18 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 20 Apr 2001 13:18:09 +0000 (13:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1945 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/xforms_helpers.C

index dee32eaca848f41e55ebf287cc380352a184922c..a501337736f2440a89681a653cf01e986f5d2dfc 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-20  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * xforms_helpers.C (formatted): do not use string::substr(1) on a
+       string of length 1 !
+
 2001-04-16  Allan Rae  <rae@lyx.org>
 
        * xforms_helpers.C (formatted): 
index ad545ce0428f4b3f19a5862f1e25a135e668c019..9f714c78c68374ef0a24fabe5999d19b0f540bb4 100644 (file)
@@ -71,7 +71,7 @@ string formatted(string const & sin, int w, int size, int style)
                char c = word[0];
                if (c == '\n') {
                        sout += line + '\n';
-                       word = word.substr(1);
+                       word.erase(0,1);
                        line_plus_word.erase();
                        line.erase();
                }