This commit is contained in:
地平线
2015-09-23 18:10:28 +08:00
parent 23605d2b74
commit 47f137da7f

View File

@@ -328,9 +328,7 @@ public class WebSocketRunner implements Runnable {
public void mask(byte[] target, int location, byte[] bytes) {
if (bytes != null && target != null) {
for (int i = 0; i < bytes.length; i++) {
target[location + i] = mask == null
? bytes[i]
: (byte) (bytes[i] ^ mask[index++ % MASK_SIZE]);
target[location + i] = mask == null ? bytes[i] : (byte) (bytes[i] ^ mask[index++ % MASK_SIZE]);
}
}
}