From: Vlad Krupin Date: Mon, 31 Dec 2001 09:13:08 +0000 (+0000) Subject: Verified and fixed bug 6852 #1. No more null byte after terminating 0x0D. X-Git-Tag: PRE_ISSET_PATCH~346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=431c1f1d310dea4f400e8dd12292ecb61a16724a;p=php Verified and fixed bug 6852 #1. No more null byte after terminating 0x0D. Verified that the problem is real when creating new files and writing a record. Both fixed and old versions seem to be able to somehow read and write already existing files properly though. @Fixed bug 6852 #1. No more null byte after terminating 0x0D. (Vlad) --- diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index 78840d2875..8f7ab60703 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -684,7 +684,7 @@ PHP_FUNCTION(dbase_create) strcpy(dbh->db_date, "19930818"); dbh->db_records = 0; dbh->db_nfields = num_fields; - dbh->db_hlen = sizeof(struct dbf_dhead) + 2 + num_fields * sizeof(struct dbf_dfield); + dbh->db_hlen = sizeof(struct dbf_dhead) + 1 + num_fields * sizeof(struct dbf_dfield); rlen = 1; /**