Index: ogr/ogrsf_frmts/shape/dbfopen.c
===================================================================
--- ogr/ogrsf_frmts/shape/dbfopen.c	(révision 22312)
+++ ogr/ogrsf_frmts/shape/dbfopen.c	(copie de travail)
@@ -802,6 +802,10 @@
     char        chFieldFill;
     SAOffset    nRecordOffset;
 
+    /* make sure that everything is written in .dbf */
+    if( !DBFFlushRecord( psDBF ) )
+        return -1;
+
 /* -------------------------------------------------------------------- */
 /*      Do some checking to ensure we can add records to this file.     */
 /* -------------------------------------------------------------------- */
