Browse Source

compactioned the table a bit.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac256@2487 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
80d05df280
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/lib/dns/util/binary_from_base16.h

+ 3 - 4
src/lib/dns/util/binary_from_base16.h

@@ -48,15 +48,14 @@ struct to_4_bit {
              0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, // 30-3f
             -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 40-4f
             -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 50-5f
-            -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 60-6f
-            -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1  // 70-7f
+            -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1  // 60-6f
         };
         // metrowerks trips this assertion - how come?
         #if ! defined(__MWERKS__)
-        BOOST_STATIC_ASSERT(128 == sizeof(lookup_table));
+        BOOST_STATIC_ASSERT(0x70 == sizeof(lookup_table));
         #endif
         signed char value = -1;
-        if((unsigned)t <= 127)
+        if((unsigned)t < sizeof(lookup_table))
             value = lookup_table[(unsigned)t];
         if(-1 == value) { 
             isc_throw(isc::BadValue,