From fed0e8b5de4b40b6e1498bd72380b7273117dd6b Mon Sep 17 00:00:00 2001 From: Gabriel Paradiso Date: Thu, 9 Jan 2025 16:45:10 +0100 Subject: [PATCH] fix: return the number of bytes copied --- pkg/workflows/wasm/host/module.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/workflows/wasm/host/module.go b/pkg/workflows/wasm/host/module.go index 48aa75118..f8bd77d02 100644 --- a/pkg/workflows/wasm/host/module.go +++ b/pkg/workflows/wasm/host/module.go @@ -736,7 +736,5 @@ func write(memory, src []byte, ptr, size int32) int64 { return -1 } buffer := memory[ptr : ptr+size] - dataLen := int64(len(src)) - copy(buffer, src) - return dataLen + return int64(copy(buffer, src)) }