This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new bec47698f fix(js): corrected the float64 array size (#3541)
bec47698f is described below
commit bec47698fbec5f1bd6702f5358d4b745708c0793
Author: Ayush Kumar <[email protected]>
AuthorDate: Tue Apr 7 11:53:50 2026 +0530
fix(js): corrected the float64 array size (#3541)
## Why?
The size of `FLOAT64_ARRAY` in the codegen was registered to be 6 bytes
instead of 8 bytes, which was a bug introduced in [PR
3266](https://github.com/apache/fory/pull/3326#discussion_r3042870701)
This introduced wrong element counts during deserializing of payloads.
## What does this PR do?
Corrects the size of `FLOAT64_ARRAY` from 6 bytes to 8.
## Related issues
N/A
## AI Contribution Checklist
- [] Substantial AI assistance was used in this PR: `yes` / `no`
- [ ] If `yes`, I included a completed [AI Contribution
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
in this PR description and the required `AI Usage Disclosure`.
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
---
javascript/packages/core/lib/gen/typedArray.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/javascript/packages/core/lib/gen/typedArray.ts
b/javascript/packages/core/lib/gen/typedArray.ts
index 50ae7c432..e3f776499 100644
--- a/javascript/packages/core/lib/gen/typedArray.ts
+++ b/javascript/packages/core/lib/gen/typedArray.ts
@@ -190,4 +190,4 @@ CodegenRegistry.register(TypeId.UINT64_ARRAY,
build(Type.uint64(), `BigUint64Arr
CodegenRegistry.register(TypeId.FLOAT16_ARRAY,
Float16ArraySerializerGenerator);
CodegenRegistry.register(TypeId.BFLOAT16_ARRAY,
BFloat16ArraySerializerGenerator);
CodegenRegistry.register(TypeId.FLOAT32_ARRAY, build(Type.float32(),
`Float32Array`, 4));
-CodegenRegistry.register(TypeId.FLOAT64_ARRAY, build(Type.float64(),
`Float64Array`, 6));
+CodegenRegistry.register(TypeId.FLOAT64_ARRAY, build(Type.float64(),
`Float64Array`, 8));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]