We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a49ee6d commit c1e055aCopy full SHA for c1e055a
pb.c
@@ -884,7 +884,7 @@ static int Ldec_pos(lua_State *L) {
884
static int Ldec_len(lua_State *L) {
885
pb_Decoder *dec = check_decoder(L, 1);
886
int type = lua_type(L, 2);
887
- lua_pushinteger(L, (lua_Integer)(dec->end - dec->p));
+ lua_pushinteger(L, (lua_Integer)(dec->end - dec->s));
888
lua_pushinteger(L, (lua_Integer)dec->len);
889
if (type <= 0)
890
dec->end = dec->s + dec->len;
0 commit comments