From aab6ddd2e5944a157a05e29c30b2bafbe6603318 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 20 Apr 2001 13:18:09 +0000 Subject: [PATCH] fix crash with error inset git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1945 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/xforms_helpers.C | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index dee32eaca8..a501337736 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-04-20 Jean-Marc Lasgouttes + + * xforms_helpers.C (formatted): do not use string::substr(1) on a + string of length 1 ! + 2001-04-16 Allan Rae * xforms_helpers.C (formatted): diff --git a/src/frontends/xforms/xforms_helpers.C b/src/frontends/xforms/xforms_helpers.C index ad545ce042..9f714c78c6 100644 --- a/src/frontends/xforms/xforms_helpers.C +++ b/src/frontends/xforms/xforms_helpers.C @@ -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(); }