This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
vm: catch stack underflow on Peek()
pull/126/merge
Ethan Buchman
10 years ago
parent
4ee387d077
commit
807bd662b2
1 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
vm/stack.go
+ 4
- 0
vm/stack.go
View File
@ -104,6 +104,10 @@ func (st *Stack) Dup(n int) {
// Not an opcode, costs no gas.
func
(
st
*
Stack
)
Peek
(
)
Word256
{
if
st
.
ptr
==
0
{
st
.
setErr
(
ErrDataStackUnderflow
)
return
Zero256
}
return
st
.
data
[
st
.
ptr
-
1
]
}
Write
Preview
Loading…
Cancel
Save