Fix indexing for record types with optional fields

Addresses #378
This commit is contained in:
Jon Siwek 2011-09-09 13:06:45 -05:00
parent 3a3f58d5df
commit eb3c5ee1a4
3 changed files with 72 additions and 1 deletions

View file

@ -169,7 +169,7 @@ char* CompositeHash::SingleValHash(int type_check, char* kp0,
{
char* kp = kp0;
RecordVal* rv = v->AsRecordVal();
RecordType* rt = v->Type()->AsRecordType();
RecordType* rt = bt->AsRecordType();
int num_fields = rt->NumFields();
for ( int i = 0; i < num_fields; ++i )