Skip to content

Commit e525d5b

Browse files
Adapt convert_digit_char for the case without radix argument
1 parent 5110f18 commit e525d5b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/java_bytecode/character_refine_preprocess.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ codet character_refine_preprocesst::convert_digit_char(
132132
conversion_inputt &target)
133133
{
134134
const code_function_callt &function_call=target;
135-
assert(function_call.arguments().size()==2);
135+
PRECONDITION(function_call.arguments().size()>=1);
136136
const exprt &arg=function_call.arguments()[0];
137-
const exprt &radix=function_call.arguments()[1];
137+
// If there is no radix argument we set it to 36 which is the maximum possible
138+
const exprt &radix=
139+
function_call.arguments().size()>1?
140+
function_call.arguments()[1]:
141+
from_integer(36, arg.type());
138142
const exprt &result=function_call.lhs();
139143
const typet &type=result.type();
140144

0 commit comments

Comments
 (0)