fix: when there is no instruction index, default to the current instruction by supplying u16:MAX
This commit is contained in:
parent
c73cdfd6ce
commit
9cf7720922
@ -94,7 +94,11 @@ export class Ed25519Program {
|
||||
|
||||
const instructionData = Buffer.alloc(messageDataOffset + message.length);
|
||||
|
||||
const index = instructionIndex != null ? instructionIndex : 0;
|
||||
const index =
|
||||
instructionIndex == null
|
||||
? 0xffff // An index of `u16::MAX` makes it default to the current instruction.
|
||||
: instructionIndex;
|
||||
|
||||
ED25519_INSTRUCTION_LAYOUT.encode(
|
||||
{
|
||||
numSignatures,
|
||||
|
Loading…
x
Reference in New Issue
Block a user