mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix JNI float argument passing
Floats are implicitly promoted to doubles when passed as part of a variable-length argument list, so we can't treat them the same way as 32-bit integers.
This commit is contained in:
parent
c6ac66e45a
commit
5a5d2a8dd2
@ -8037,10 +8037,17 @@ class ArgumentList {
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
case 'D':
|
||||
addLong(va_arg(arguments, uint64_t));
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
addLong(doubleToBits(va_arg(arguments, double)));
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
addInt(floatToBits(va_arg(arguments, double)));
|
||||
break;
|
||||
|
||||
default:
|
||||
addInt(va_arg(arguments, uint32_t));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user