Skip to content

Commit 365b3a6

Browse files
committed
casting to ints with parseInt
1 parent c5915f3 commit 365b3a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/decode.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ decode.list = function() {
8585
decode.integer = function() {
8686

8787
var end = decode.find( 0x65 )
88-
var number = +decode.data.toString('ascii', decode.position+1, end )
88+
var number = decode.data.toString('ascii', decode.position+1, end )
8989

9090
decode.position += end + 1 - decode.position
9191

92-
return parseFloat( number ) << 0
92+
return parseInt( number )
9393
}
9494

9595
decode.bytes = function() {
9696

9797
var sep = decode.find( 0x3A )
98-
var length = +decode.data.toString('ascii', decode.position, sep )
98+
var length = parseInt(decode.data.toString('ascii', decode.position, sep ), 10)
9999
var end = ++sep + length
100100

101101
decode.position += end - decode.position

0 commit comments

Comments
 (0)