aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-11-14 23:48:07 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-11-14 23:48:07 +0000
commit1e62f7e9d30a42d1ec3737b0d838ee189f2fc931 (patch)
tree8ca38a59ec82203b930d6df6116344decda667d4 /tools
parent8ee794a5de7501352bb0fc793451cafb67b8ac29 (diff)
Sort value_string array by value if used with value_str_ext fcns;
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34874 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2wrs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index b256650c5d..86e89e249d 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -1358,6 +1358,8 @@ class EthCtx:
out = ""
has_enum = self.eth_type[tname]['enum'] & EF_ENUM
use_ext = self.eth_type[tname]['vals_ext']
+ if (use_ext):
+ vals.sort(key=lambda vals_entry: int(vals_entry[0]))
if (not self.eth_type[tname]['export'] & EF_VALS):
out += 'static '
if (self.eth_type[tname]['export'] & EF_VALS) and (self.eth_type[tname]['export'] & EF_TABLE):