mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +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;
|
break;
|
||||||
|
|
||||||
case 'J':
|
case 'J':
|
||||||
case 'D':
|
|
||||||
addLong(va_arg(arguments, uint64_t));
|
addLong(va_arg(arguments, uint64_t));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'D':
|
||||||
|
addLong(doubleToBits(va_arg(arguments, double)));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'F':
|
||||||
|
addInt(floatToBits(va_arg(arguments, double)));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
addInt(va_arg(arguments, uint32_t));
|
addInt(va_arg(arguments, uint32_t));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user