Ethereal-dev: [Ethereal-dev] Patch to proto.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Peter Johansson <Peter.xc.Johansson@xxxxxxxxxxxx>
Date: Wed, 14 Sep 2005 11:27:24 +0200
I added a description for the call to DISSECTOR_ASSERT in proto.c to be printed to stderr.

/ Peter
Index: C:/ethereal-win32-libs/epan/proto.c
===================================================================
--- C:/ethereal-win32-libs/epan/proto.c	(revision 15781)
+++ C:/ethereal-win32-libs/epan/proto.c	(working copy)
@@ -2916,7 +2916,7 @@
 		 * 0 (which is unlikely to be the field ID we get back
 		 * from "proto_register_field_init()").
 		 */
-		DISSECTOR_ASSERT(*ptr->p_id == -1 || *ptr->p_id == 0);
+		DISSECTOR_ASSERT((*ptr->p_id == -1 || *ptr->p_id == 0) && "Duplicate field detected in call to proto_register_field_array");
 
 		if (proto != NULL) {
 			if (proto->fields == NULL) {