Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
5ca197d0
Commit
5ca197d0
authored
Nov 24, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix enum
parent
9c7db6d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Enum.js
src/solidity/types/Enum.js
+5
-1
No files found.
src/solidity/types/Enum.js
View file @
5ca197d0
...
@@ -16,7 +16,11 @@ function Enum (enumDef) {
...
@@ -16,7 +16,11 @@ function Enum (enumDef) {
Enum
.
prototype
.
decodeFromStorage
=
function
(
location
,
storageContent
)
{
Enum
.
prototype
.
decodeFromStorage
=
function
(
location
,
storageContent
)
{
var
value
=
util
.
extractHexByte
(
location
,
storageContent
,
this
.
storageBytes
)
var
value
=
util
.
extractHexByte
(
location
,
storageContent
,
this
.
storageBytes
)
value
=
parseInt
(
value
)
value
=
parseInt
(
value
)
return
this
.
enumDef
.
children
[
value
].
attributes
.
name
if
(
this
.
enumDef
.
children
.
length
>
value
)
{
return
this
.
enumDef
.
children
[
value
].
attributes
.
name
}
else
{
return
'INVALID_ENUM<'
+
value
+
'>'
}
}
}
module
.
exports
=
Enum
module
.
exports
=
Enum
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