return (offset - ((const char *) array - (const char *) base)) / sizeof (T);
}
template <typename T>
+ static inline unsigned int byteOffsetToIndex (unsigned int offset,
+ const void *base,
+ const T *array)
+ {
+ return offsetToIndex (offset, base, array);
+ }
+ template <typename T>
static inline unsigned int wordOffsetToIndex (unsigned int offset,
const void *base,
const T *array)
return offset;
}
template <typename T>
+ static inline unsigned int byteOffsetToIndex (unsigned int offset,
+ const void *base,
+ const T *array)
+ {
+ return offset / 2;
+ }
+ template <typename T>
static inline unsigned int wordOffsetToIndex (unsigned int offset,
const void *base,
const T *array)
unsigned int tuple_count = MAX (1u, table->header.tuple_count ());
unsigned int kern_idx = Format1EntryT::kernActionIndex (entry);
- kern_idx = Types::offsetToIndex (kern_idx, &table->machine, kernAction.arrayZ);
+ kern_idx = Types::byteOffsetToIndex (kern_idx, &table->machine, kernAction.arrayZ);
const FWORD *actions = &kernAction[kern_idx];
if (!c->sanitizer.check_array (actions, depth, tuple_count))
{