Merge pull request #4140 from matrix-org/travis/fix-qr-length

Use the right function for creating binary verification QR codes
pull/21833/head
Travis Ralston 2020-02-26 13:44:59 -07:00 committed by GitHub
commit b45a1c129f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ export default class VerificationQRCode extends React.PureComponent {
};
const appendInt = (i: number) => {
const tmpBuf = Buffer.alloc(2);
tmpBuf.writeInt8(i, 0);
tmpBuf.writeInt16BE(i, 0);
buf = Buffer.concat([buf, tmpBuf]);
};
const appendStr = (s: string, enc: string, withLengthPrefix = true) => {