From d2782280340c6e11e110ec514f0de7e17c3d080c Mon Sep 17 00:00:00 2001 From: BenceJanosSzabo <bence.janos.szabo@ericsson.com> Date: Tue, 20 Sep 2016 16:41:51 +0200 Subject: [PATCH] select case switch generation fix Change-Id: Ie25198ffee3d553a519d32ae49a8f83fe511385f Signed-off-by: BenceJanosSzabo <bence.janos.szabo@ericsson.com> --- compiler2/ttcn3/Statement.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler2/ttcn3/Statement.cc b/compiler2/ttcn3/Statement.cc index 5ce6b1ce0..97e95f6ec 100644 --- a/compiler2/ttcn3/Statement.cc +++ b/compiler2/ttcn3/Statement.cc @@ -10688,12 +10688,8 @@ error: used_numbers.add(&val->get_val()); if (!already_present) { already_present_all = false; - str = mputprintf(str, "case("); - expression_struct expr; - Code::init_expr(&expr); - tis->get_ti_byIndex(i)->get_specific_value()->generate_code_expr(&expr); - str = mputprintf(str, "%s):\n", expr.expr); - Code::free_expr(&expr); + str = mputprintf(str, "case(%ld):\n", + (long int)(tis->get_ti_byIndex(i)->get_specific_value()->get_val_Int()->get_val())); } } } else { -- GitLab