[qfcc] Fix out-by-one in type meta check

This commit is contained in:
Bill Currie 2020-03-27 22:48:38 +09:00
parent 1da6eb5f51
commit c6746fa391

View file

@ -275,7 +275,7 @@ qfo_encode_type (type_t *type)
}
if (type->type_def)
return type->type_def;
if (type->meta > sizeof (funcs) / (sizeof (funcs[0])))
if (type->meta >= sizeof (funcs) / (sizeof (funcs[0])))
internal_error (0, "bad type meta type");
if (!type->encoding)
type->encoding = type_get_encoding (type);