Skip to content

Commit cea5842

Browse files
committed
Fix: invalid mask shift
1 parent f8af4ce commit cea5842

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

websocket_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,5 @@ uint8_t websocket_decode(char * dst, const char * src, size_t len, char mask[4],
185185
dst[i] = src[i] ^ mask[(i + mask_offset) % 4];
186186
}
187187

188-
return (uint8_t) ((i + mask_offset + 1) % 4);
188+
return (uint8_t) ((i + mask_offset) % 4);
189189
}

0 commit comments

Comments
 (0)