diff --git a/compiler2/EnumItem.cc b/compiler2/EnumItem.cc index 858c11dbed5690418bf014e376cef03f89fb1bae..f83a6d095248e128872912b2819d8064a434ea95 100644 --- a/compiler2/EnumItem.cc +++ b/compiler2/EnumItem.cc @@ -99,7 +99,7 @@ bool EnumItem::calculate_int_value() { switch (v->get_valuetype()) { case Value::V_INT: - int_value = new int_val_t(v->get_val_Int()->get_val()); + int_value = new int_val_t(*(v->get_val_Int())); break; case Value::V_BSTR: { long int res = strtol(v->get_val_str().c_str(), NULL, 2); diff --git a/function_test/Semantic_Analyser/ASN_SA_1_TD.script b/function_test/Semantic_Analyser/ASN_SA_1_TD.script index 7519623358ac58f6ce555bcee791da1fa4a4d77b..4e888b3f8cf422b5a9e60424fa6fb1bc2ab5daa6 100644 --- a/function_test/Semantic_Analyser/ASN_SA_1_TD.script +++ b/function_test/Semantic_Analyser/ASN_SA_1_TD.script @@ -672,7 +672,7 @@ END <RESULT IF_PASS COUNT 1> (?im)\berror\b.+?no.+?assignment.+?Nonexi <END_RESULT> -<RESULT IF_PASS COUNT 1> +<RESULT IF_PASS COUNT 3> (?is)\berror: <END_RESULT> <RESULT IF_PASS POSITIVE>