Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions data/transactions/logic/assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1254,9 +1254,12 @@ func disBnz(dis *disassembleState) {
dis.nextpc = dis.pc + 3
offset := (uint(dis.program[dis.pc+1]) << 8) | uint(dis.program[dis.pc+2])
target := int(offset) + dis.pc + 3
dis.labelCount++
label := fmt.Sprintf("label%d", dis.labelCount)
dis.putLabel(label, target)
label, labelExists := dis.pendingLabels[target]
if !labelExists {
dis.labelCount++
label = fmt.Sprintf("label%d", dis.labelCount)
dis.putLabel(label, target)
}
_, dis.err = fmt.Fprintf(dis.out, "bnz %s\n", label)
}

Expand Down
3 changes: 3 additions & 0 deletions data/transactions/logic/assembler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,19 @@ len
arg 5
len
+
bnz label1
global MinTxnFee
global MinBalance
global MaxTxnLife
txn Sender
txn Fee
bnz label1
txn FirstValid
txn LastValid
txn Note
txn Receiver
txn Amount
label1:
txn CloseRemainderTo
txn VotePK
txn SelectionPK
Expand Down