Skip to content

Commit 7792639

Browse files
committed
processXorOne(): minor code style improvement
1 parent c25b945 commit 7792639

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

KaitaiStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,8 @@ class KaitaiStream {
820820
* @returns The Xor'd bytes.
821821
*/
822822
public static processXorOne(data: Uint8Array, key: number): Uint8Array {
823-
const r = new Uint8Array(data.length);
824823
const dl = data.length;
824+
const r = new Uint8Array(dl);
825825
for (let i = 0; i < dl; i++)
826826
r[i] = data[i] ^ key;
827827
return r;

0 commit comments

Comments
 (0)