summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Zinternal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Zinternal.c b/lib/Zinternal.c
index ef10ce7..cd29e59 100644
--- a/lib/Zinternal.c
+++ b/lib/Zinternal.c
@@ -869,7 +869,7 @@ Z_ZcodeFormatRawHeader(ZNotice_t *notice,
return (ZERR_HEADERLEN);
if (ZMakeAscii32(ptr, end-ptr,
- Z_NUMFIELDS + notice->z_num_other_fields)
+ (notice->z_num_hdr_fields ? (notice->z_num_hdr_fields - notice->z_num_other_fields) : Z_NUMFIELDS) + notice->z_num_other_fields)
== ZERR_FIELDLEN)
return (ZERR_HEADERLEN);
ptr += strlen(ptr)+1;