Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
og-rek
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
og-rek
Commits
9112562f
Commit
9112562f
authored
Nov 25, 2013
by
Damian Gryski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encoder: oops, uint16s are little-endian too
parent
ea2098b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
encode.go
encode.go
+1
-1
No files found.
encode.go
View file @
9112562f
...
...
@@ -135,7 +135,7 @@ func (e *Encoder) encodeInt(k reflect.Kind, i int64) {
case
i
>
0
&&
i
<
math
.
MaxUint8
:
e
.
w
.
Write
([]
byte
{
opBinint1
,
byte
(
i
)})
case
i
>
0
&&
i
<
math
.
MaxUint16
:
e
.
w
.
Write
([]
byte
{
opBinint2
,
byte
(
i
>>
8
),
byte
(
i
)})
e
.
w
.
Write
([]
byte
{
opBinint2
,
byte
(
i
),
byte
(
i
>>
8
)})
case
i
>=
math
.
MinInt32
&&
i
<=
math
.
MaxInt32
:
e
.
w
.
Write
([]
byte
{
opBinint
})
binary
.
Write
(
e
.
w
,
binary
.
LittleEndian
,
int32
(
i
))
...
...
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