Kaydet (Commit) c589fa17 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Dalvik enforces byte constants being in range (-128..127)

üst e320d81c
......@@ -2447,7 +2447,10 @@ void addConstant(
rtl::OString(
RTL_CONSTASCII_STRINGPARAM("Bad type information"))); //TODO
}
valueIndex = classFile->addIntegerInfo(fieldValue.m_value.aByte);
if (fieldValue.m_value.aByte < 0x80)
valueIndex = classFile->addIntegerInfo(fieldValue.m_value.aByte);
else
valueIndex = classFile->addIntegerInfo(-256 + (int) fieldValue.m_value.aByte);
break;
case codemaker::UnoType::SORT_SHORT:
......
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