mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-16 05:10:34 +00:00
fix
This commit is contained in:
parent
3f0730ed4f
commit
690c073328
@ -192,7 +192,9 @@ class BmpParser implements ImageParser {
|
|||||||
stream.once('error', reject);
|
stream.once('error', reject);
|
||||||
stream.once('readable', () => {
|
stream.once('readable', () => {
|
||||||
const buf = stream.read(26) as Buffer;
|
const buf = stream.read(26) as Buffer;
|
||||||
if (!buf || buf.length < 26) return resolve(undefined);
|
if (!buf || buf.length < 26) {
|
||||||
|
return resolve(undefined);
|
||||||
|
}
|
||||||
if (this.canParse(buf)) {
|
if (this.canParse(buf)) {
|
||||||
const width = buf.readUInt32LE(18);
|
const width = buf.readUInt32LE(18);
|
||||||
const height = buf.readUInt32LE(22);
|
const height = buf.readUInt32LE(22);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user