Commit 4c8cb83f authored by Chunchi Che's avatar Chunchi Che Committed by WANG HE

fix joingame

parent ffa38cc1
......@@ -23,7 +23,7 @@ export default class CtosJoinGamePacket extends ygoProPacket {
dataView.setUint8(5, (gameId >> 8) & 0xff);
dataView.setUint8(6, (gameId >> 16) & 0xff);
dataView.setUint8(7, (gameId >> 32) & 0xff);
exData.set(passWd, 3);
exData.set(passWd, 8);
super(exData.length + 1, CTOS_JOIN_GAME, exData);
}
......
......@@ -12,6 +12,10 @@ export function strEncodeUTF16(str: string) {
i++
) {
bufView[i] = str.charCodeAt(i);
if (i === strLen - 1 && i < bufView.length - 1) {
bufView[i + 1] = 0;
}
}
return new Uint8Array(buf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment