From 1938bd3ce69387bfae25737c88ac814336bee90f Mon Sep 17 00:00:00 2001 From: Tom Lauwaerts Date: Wed, 10 Jun 2026 18:21:21 +0200 Subject: [PATCH] Disable 64 bit float encoding --- src/messaging/Message.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messaging/Message.ts b/src/messaging/Message.ts index 888570d..62c54dd 100644 --- a/src/messaging/Message.ts +++ b/src/messaging/Message.ts @@ -177,8 +177,8 @@ export namespace Message { let payload: string = ''; args.forEach((arg: Value) => { if (arg.type === Float.f32 || arg.type === Float.f64 || arg.type === Special.nan || arg.type === Special.infinity) { - const buff = Buffer.alloc(arg.type === Float.f32 ? 4 : 8); - write(buff, Number(arg.value), 0, true, arg.type === Float.f32 ? 23 : 52, buff.length); // todo fix precision loss + const buff = Buffer.alloc(4); + write(buff, Number(arg.value), 0, true, 23, buff.length); // todo fix precision loss payload += buff.toString('hex'); } else { payload += WASM.leb128(arg.value);