Skip to content

Commit

Permalink
Reading empty varint will raise error
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Dec 27, 2012
1 parent 4ef1648 commit cb3ee99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protocop/buffer.rb
Expand Up @@ -163,7 +163,7 @@ def read_sint64
end

def read_string
(length = read_varint) ? read(length) : ""
read(read_varint)
end

def read_uint32
Expand Down

0 comments on commit cb3ee99

Please sign in to comment.