Fix bogus display of known characterists as unknown


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5534 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-tools/genpeimg/src/img_pe.c b/mingw-w64-tools/genpeimg/src/img_pe.c
index 29cccc9..d0c486f 100644
--- a/mingw-w64-tools/genpeimg/src/img_pe.c
+++ b/mingw-w64-tools/genpeimg/src/img_pe.c
@@ -272,6 +272,8 @@
   if (hdr_cha != 0)
     {
       fprintf (outfp, "  Optional Characteristics:\n   ");
+      if ((hdr_cha & 0x20) != 0)
+	fprintf (outfp, " large-address-aware");
       if ((hdr_cha & 0x40) != 0)
         fprintf (outfp, " dynamic-base");
       if ((hdr_cha & 0x80) != 0)
@@ -290,7 +292,7 @@
         fprintf (outfp, " wdm-Driver");
       if ((hdr_cha & 0x8000) != 0)
         fprintf (outfp, " terminal-server-aware");
-      hdr_cha &= ~(0x63f);
+      hdr_cha &= ~(0xbfef);
       if (hdr_cha)
         fprintf (outfp, " unknown(0x%x)", hdr_cha);
       fprintf (outfp, "\n");