We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18701cb commit b17e6fbCopy full SHA for b17e6fb
src/java_bytecode/expr2java.cpp
@@ -230,12 +230,18 @@ std::string expr2javat::convert_constant(
230
{
231
if(src.type().id()==ID_bool)
232
233
- // C++ has built-in Boolean constants, in contrast to C
+ // Java has built-in Boolean constants, in contrast to C
234
if(src.is_true())
235
return "true";
236
else if(src.is_false())
237
return "false";
238
}
239
+ else if(src.type().id()==ID_pointer)
240
+ {
241
+ // Java writes 'null' for the null reference
242
+ if(src.is_zero())
243
+ return "null";
244
+ }
245
246
return expr2ct::convert_constant(src, precedence);
247
0 commit comments