aboutsummaryrefslogtreecommitdiff
path: root/src/http/websocket.zig
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-02-23 23:57:19 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-23 23:57:19 -0800
commit3f04f8d0a653cf5decef2225c2044742b382718a (patch)
tree91eb6500834e3157ecb9ab208101aa368a1191c8 /src/http/websocket.zig
parentb5bdde28ed34070cbb1d34d13f414f4c513ee40d (diff)
downloadbun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.gz
bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.zst
bun-3f04f8d0a653cf5decef2225c2044742b382718a.zip
Upgrade Zig (#2151)
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
Diffstat (limited to '')
-rw-r--r--src/http/websocket.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/websocket.zig b/src/http/websocket.zig
index 5ab4fe690..8bc101abb 100644
--- a/src/http/websocket.zig
+++ b/src/http/websocket.zig
@@ -248,7 +248,7 @@ pub const Websocket = struct {
try stream.writeAll(mask);
// Encode
- for (dataframe.data) |c, i| {
+ for (dataframe.data, 0..) |c, i| {
try stream.writeByte(c ^ mask[i % 4]);
}
} else {
@@ -334,7 +334,7 @@ pub const Websocket = struct {
if (header.mask) {
const mask = buf[0..4];
// Decode data in place
- for (data) |_, i| {
+ for (data, 0..) |_, i| {
data[i] ^= mask[i % 4];
}
}