- bugfix: if found, trailing wildcards are removed from signatures at load time. They don't make much sense and, if present, led to the signature not matching byte sequences that should. Any sequence of '??' after the last non-'??' byte in the signature is ignored.

git-svn-id: http://pefile.googlecode.com/svn/trunk@74 8842bc4e-7134-0410-8230-5dc5194fb5c1
diff --git a/peutils.py b/peutils.py
index b08a01e..f125e61 100644
--- a/peutils.py
+++ b/peutils.py
@@ -46,7 +46,7 @@
         # RegExp to match a signature block
         #
         self.parse_sig = re.compile(
-            '\[(.*?)\]\s+?signature\s*=\s*(.*?)ep_only\s*=\s*(\w+)(?:\s*section_start_only\s*=\s*(\w+)|)', re.S)
+            '\[(.*?)\]\s+?signature\s*=\s*(.*?)(\s+\?\?)*\s*ep_only\s*=\s*(\w+)(?:\s*section_start_only\s*=\s*(\w+)|)', re.S)
         
         # Signature information
         #
@@ -376,7 +376,7 @@
         # For each signature, get the details and load it into the
         # signature tree
         #
-        for packer_name, signature, ep_only, section_start_only in matches:
+        for packer_name, signature, superfluous_wildcards, ep_only, section_start_only in matches:
             
             ep_only = ep_only.strip().lower()