Update of /cvsroot/mahogany/M/src/modules
In directory usw-pr-cvs1:/tmp/cvs-serv4296/src/modules

Modified Files:
        LayoutEditor.cpp 
Log Message:
fixed a (fatal) bug when the text becomes empty after running the external editor

Index: LayoutEditor.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/LayoutEditor.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -u -2 -r1.10 -r1.11
--- LayoutEditor.cpp    8 Sep 2002 19:23:12 -0000       1.10
+++ LayoutEditor.cpp    4 Oct 2002 15:45:31 -0000       1.11
@@ -474,4 +474,6 @@
       //     quick workaround for this bug - of course, it's not a real solution
       //     (FIXME)
+      if ( !text.empty() )
+      {
       size_t index = text.length() - 1;
       if ( text[index] == '\n' )
@@ -486,4 +488,5 @@
          // FIXME: need this horrible const_cast for this hack to work
          ((String &)text)[index] = '\0';
+         }
       }
 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to