skip map value with depth limit

This commit is contained in:
郑桐 2021-10-09 16:01:28 +08:00 committed by Jens Geyer
parent 6a7278b9db
commit 0f760537c3

View File

@ -146,7 +146,11 @@ func Skip(ctx context.Context, self TProtocol, fieldType TType, maxDepth int) (e
if err != nil { if err != nil {
return err return err
} }
self.Skip(ctx, valueType)
err = Skip(ctx, self, valueType, maxDepth-1)
if err != nil {
return err
}
} }
return self.ReadMapEnd(ctx) return self.ReadMapEnd(ctx)
case SET: case SET: