Hi,
        am I the only one using FC3 with the latest gcc?

        For some weeks I haven't been able to use the cvs version as I had an 
assert reading files, something like:

$  src/lyx ~/newfile2.lyx
void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1]  
buffer: 0
void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1]  
buffer: 0
lyx: 
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/basic_string.h:626:
 
typename _Alloc::const_reference std::basic_string<_CharT, _Traits, 
_Alloc>::operator[](typename _Alloc::size_type) const [with _CharT = char, 
_Traits = std::char_traits<char>, _Alloc = std::allocator<char>]: Assertion 
`__pos <= size()' failed.
Aborted

After I bit of research I found the culprit:

Index: src/insets/insetcommandparams.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcommandparams.C,v
retrieving revision 1.13
diff -u -p -r1.13 insetcommandparams.C
--- src/insets/insetcommandparams.C     3 Apr 2004 08:37:10 -0000       1.13
+++ src/insets/insetcommandparams.C     5 May 2005 15:08:54 -0000
@@ -47,7 +47,7 @@ void InsetCommandParams::scanCommand(str

        for (string::size_type i = 0; i < cmd.length(); ++i) {
                char c = cmd[i];
-               char b = cmd[i-1];
+               char b = i? cmd[i-1]: 0;
                if ((state == CMDNAME && c == ' ') ||
                    (state == CMDNAME && c == '[') ||
                    (state == CMDNAME && c == '{')) {

  Is this the right fix?
-- 
José Abílio

Reply via email to