diff --git a/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets b/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets index 7014d3230513b328298b4d4a5a9ef3ab433ff0f1..29be995e61a71c9041d02f8c1ce7e81e1d6be8b4 100644 --- a/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets +++ b/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets @@ -758,7 +758,7 @@ export default namespace zlib { } public gzwrite(buf: ArrayBuffer, len: long): Promise { - if (buf.byteLength == 0 || len > (buf.byteLength as long)) { + if (buf.byteLength == 0 || len > (buf.byteLength.toLong())) { throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); } let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => {