PATCH: WP importer segfaults


Subject: PATCH: WP importer segfaults
From: j.m.maurer (j.m.maurer@student.utwente.nl)
Date: Thu Feb 07 2002 - 10:38:06 CST


This small patch fixes the segfaults the WordPerfect importer caused
when loading documents which contain only non parseble data, ie. empty
documents, or documents with only one ColDef which is currently skipped.

Bye!
  Marc

Index: abi/src/wp/impexp/xp/ie_imp_WordPerfect.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_imp_WordPerfect.cpp,v
retrieving revision 1.13
diff -u -r1.13 ie_imp_WordPerfect.cpp
--- abi/src/wp/impexp/xp/ie_imp_WordPerfect.cpp 2002/01/16 13:17:35 1.13
+++ abi/src/wp/impexp/xp/ie_imp_WordPerfect.cpp 2002/02/07 16:35:15
@@ -617,8 +617,7 @@
    
    UT_DEBUGMSG(("WordPerfect: File Pointer at %i equals or exceeds document length of %i\n", (int)ftell(m_importFile), (int)m_documentEnd));
    
- if(m_textBuf.getLength() > 0)
- X_CheckWordPerfectError(_flushText());
+ X_CheckWordPerfectError(_flushText());
    
    return UT_OK;
 }



This archive was generated by hypermail 2b25 : Thu Feb 07 2002 - 10:39:35 CST