Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
554f4f6f
Commit
554f4f6f
authored
May 08, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed disasamble for all pushes
parent
6c66cb3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
asm.go
ethchain/asm.go
+4
-3
No files found.
ethchain/asm.go
View file @
554f4f6f
...
@@ -21,9 +21,10 @@ func Disassemble(script []byte) (asm []string) {
...
@@ -21,9 +21,10 @@ func Disassemble(script []byte) (asm []string) {
asm
=
append
(
asm
,
fmt
.
Sprintf
(
"%v"
,
op
))
asm
=
append
(
asm
,
fmt
.
Sprintf
(
"%v"
,
op
))
switch
op
{
switch
op
{
case
oPUSH
32
:
// Push PC+1 on to the stack
case
oPUSH
1
,
oPUSH2
,
oPUSH3
,
oPUSH4
,
oPUSH5
,
oPUSH6
,
oPUSH7
,
oPUSH8
,
oPUSH9
,
oPUSH10
,
oPUSH11
,
oPUSH12
,
oPUSH13
,
oPUSH14
,
oPUSH15
,
oPUSH16
,
oPUSH17
,
oPUSH18
,
oPUSH19
,
oPUSH20
,
oPUSH21
,
oPUSH22
,
oPUSH23
,
oPUSH24
,
oPUSH25
,
oPUSH26
,
oPUSH27
,
oPUSH28
,
oPUSH29
,
oPUSH30
,
oPUSH31
,
oPUSH32
:
pc
.
Add
(
pc
,
ethutil
.
Big1
)
pc
.
Add
(
pc
,
ethutil
.
Big1
)
data
:=
script
[
pc
.
Int64
()
:
pc
.
Int64
()
+
32
]
a
:=
int64
(
op
)
-
int64
(
oPUSH1
)
+
1
data
:=
script
[
pc
.
Int64
()
:
pc
.
Int64
()
+
a
]
val
:=
ethutil
.
BigD
(
data
)
val
:=
ethutil
.
BigD
(
data
)
var
b
[]
byte
var
b
[]
byte
...
@@ -35,7 +36,7 @@ func Disassemble(script []byte) (asm []string) {
...
@@ -35,7 +36,7 @@ func Disassemble(script []byte) (asm []string) {
asm
=
append
(
asm
,
fmt
.
Sprintf
(
"0x%x"
,
b
))
asm
=
append
(
asm
,
fmt
.
Sprintf
(
"0x%x"
,
b
))
pc
.
Add
(
pc
,
big
.
NewInt
(
3
1
))
pc
.
Add
(
pc
,
big
.
NewInt
(
a
-
1
))
}
}
pc
.
Add
(
pc
,
ethutil
.
Big1
)
pc
.
Add
(
pc
,
ethutil
.
Big1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment