a lil cleaner

This commit is contained in:
2025-06-05 14:00:39 -04:00
parent 6dfcef9225
commit 256e21f226
+1 -2
View File
@@ -6,8 +6,7 @@ const allocator = std.heap.wasm_allocator;
export fn decodeStringWasm(str: *const [65:0]u8) usize {
if (imb.decodeString(str)) |v| {
const ptr = allocator.create([31]u8) catch unreachable;
const result = v.tracking_code ++ v.routing_code;
@memcpy(ptr, &result);
ptr.* = v.tracking_code ++ v.routing_code;
return @intFromPtr(ptr);
} else |e| switch (e) {
error.InvalidCharacter => return 0,