krpc 0.1.1 → 0.1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/krpc.gemspec +1 -1
- data/lib/krpc/protobuf_utils.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0f3c082901ab9699ece2d8033381250ec2990a7
|
4
|
+
data.tar.gz: 00a0e3ac5f6e4b7e4c105557f8ee68f62a143a6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 737ad5c400faf806f6211f5c4928d39126f2738bc401fe09926885444a4857000cd454bf5711904f3ba0a6778df0229928263c2852ac69016d7e53190b31eb24
|
7
|
+
data.tar.gz: 4c9a51a7828b56e27ca6be04f2ab9fcc53d7d0cabd042710e20af05ec36fea994b41878f6b8024a72199d9021eb405e9be7f418b10ff7db7e9e675177fb7a5b0
|
data/krpc.gemspec
CHANGED
data/lib/krpc/protobuf_utils.rb
CHANGED
@@ -30,7 +30,6 @@ module KRPC
|
|
30
30
|
shift = 0
|
31
31
|
loop do
|
32
32
|
byte = bytes[pos].ord # <-- replace ".ord" with ".bytes[0]" if ".ord" start to cause problems again
|
33
|
-
binding.pry if byte > 130
|
34
33
|
pos += 1
|
35
34
|
result |= (byte & 0b0111_1111) << shift
|
36
35
|
return [result, pos] if (byte & 0b1000_0000) == 0
|
@@ -59,7 +58,7 @@ module KRPC
|
|
59
58
|
def decode_bool(bytes)
|
60
59
|
decode_varint(bytes) != 0
|
61
60
|
end
|
62
|
-
def decode_string(bytes)
|
61
|
+
def decode_string(bytes)
|
63
62
|
size, pos = decode_varint_pos(bytes)
|
64
63
|
bytes[pos..(pos+size)]
|
65
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1
|
4
|
+
version: 0.1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Więch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_protobuf
|