Skip to content

Commit c98a50e

Browse files
committed
fix: cast float
1 parent 5eca306 commit c98a50e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/webui.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ pub fn binding(self: webui, element: [:0]const u8, comptime callback: anytype) !
833833
// Convert floating point values
834834
.float => {
835835
const res = e.getFloatAt(i - index);
836-
param_tup[i] = res;
836+
param_tup[i] = @floatCast(res);
837837
},
838838
// Handle pointer types with special cases
839839
.pointer => |pointer| {
@@ -845,11 +845,11 @@ pub fn binding(self: webui, element: [:0]const u8, comptime callback: anytype) !
845845
param_tup[i] = str_ptr;
846846
}
847847
}
848-
// Handle Event pointers
848+
// Handle Event pointers
849849
} else if (pointer.size == .one and pointer.child == Event) {
850850
param_tup[i] = e;
851851
index += 1;
852-
// Handle raw byte pointers
852+
// Handle raw byte pointers
853853
} else if (pointer.size == .many and pointer.child == u8 and pointer.is_const == true and pointer.sentinel() == null) {
854854
const raw_ptr = e.getRawAt(i - index);
855855
param_tup[i] = raw_ptr;

0 commit comments

Comments
 (0)