pidl/ws: remove any starting _ in WS field names
authorAurelien Aptel <aaptel@suse.com>
Tue, 9 Feb 2016 16:12:41 +0000 (17:12 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 20 Jun 2016 10:08:21 +0000 (12:08 +0200)
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
pidl/lib/Parse/Pidl/Wireshark/NDR.pm

index c0f6876f598c093db7953cfb8e158e770a1c5acd..928e02dc0d4153a713ba26b84f0d7c95708696b7 100644 (file)
@@ -59,6 +59,7 @@ sub field2name($)
 {
        my($field) = shift;
 
+       $field =~ s/^(_)*//g;           # Remove any starting underscores
        $field =~ s/_/ /g;              # Replace underscores with spaces
        $field =~ s/(\w+)/\u\L$1/g;     # Capitalise each word