updated for version 7.1-146
diff --git a/src/fileio.c b/src/fileio.c
index 594daf3..0166389 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4251,7 +4251,8 @@
 	 * they don't it adds one.
 	 * With other RMS structures it works perfect without this fix.
 	 */
-	if ((buf->b_fab_rat & (FAB$M_FTN | FAB$M_CR)) != 0)
+	if (buf->b_fab_rfm == FAB$C_VFC
+		|| ((buf->b_fab_rat & (FAB$M_FTN | FAB$M_CR)) != 0))
 	{
 	    int b2write;