From af512ce582dcc575a4269cb7dec6a144653df5f5 Mon Sep 17 00:00:00 2001
From: Nicolas Iooss <none@none>
Date: Mon, 30 Mar 2015 17:06:57 +0800
Subject: [PATCH] Make LEFieldLenField honour the count_of parameter

LEFieldLenField.__init__ needs to pass the count_of parameter to
FieldLenField.__init__ to make this parameter not useless.
---
 scapy/fields.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scapy/fields.py b/scapy/fields.py
index db0b3ca0..ad9c9a76 100644
--- a/scapy/fields.py
+++ b/scapy/fields.py
@@ -874,7 +874,7 @@ class LELongField(Field):
 # Little endian fixed length field
 class LEFieldLenField(FieldLenField):
     def __init__(self, name, default,  length_of=None, fmt = "<H", count_of=None, adjust=lambda pkt,x:x, fld=None):
-        FieldLenField.__init__(self, name, default, length_of=length_of, fmt=fmt, fld=fld, adjust=adjust)
+        FieldLenField.__init__(self, name, default, length_of=length_of, fmt=fmt, count_of=count_of, fld=fld, adjust=adjust)
 
 
 class FlagsField(BitField):
-- 
GitLab