Commit c670dc45 authored by Robert Griesemer's avatar Robert Griesemer

bug fix

R=rsc
OCL=32563
CL=32563
parent b754b434
......@@ -569,10 +569,11 @@ func (st *state) findVar(s string) reflect.Value {
if s == "@" {
return st.data
}
data := reflect.Indirect(st.data);
data := st.data;
elems := strings.Split(s, ".", 0);
for i := 0; i < len(elems); i++ {
// Look up field; data must be a struct.
data = reflect.Indirect(data);
typ, ok := data.Type().(*reflect.StructType);
if !ok {
return nil
......@@ -581,7 +582,7 @@ func (st *state) findVar(s string) reflect.Value {
if !ok {
return nil
}
data = reflect.Indirect(data.(*reflect.StructValue).Field(field.Index));
data = data.(*reflect.StructValue).Field(field.Index);
}
return data
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment