Skip to content

Commit c1e055a

Browse files
committed
fix bug that pb.lua can not boostrap :(
1 parent a49ee6d commit c1e055a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ static int Ldec_pos(lua_State *L) {
884884
static int Ldec_len(lua_State *L) {
885885
pb_Decoder *dec = check_decoder(L, 1);
886886
int type = lua_type(L, 2);
887-
lua_pushinteger(L, (lua_Integer)(dec->end - dec->p));
887+
lua_pushinteger(L, (lua_Integer)(dec->end - dec->s));
888888
lua_pushinteger(L, (lua_Integer)dec->len);
889889
if (type <= 0)
890890
dec->end = dec->s + dec->len;

0 commit comments

Comments
 (0)