diff --git a/src/pngv3.ts b/src/pngv3.ts index bd68e66..b89bb75 100644 --- a/src/pngv3.ts +++ b/src/pngv3.ts @@ -280,7 +280,8 @@ const embedInRawDeflate = (b: Buffer, h: Buffer) => { }; export const inject_data = async (container: File, injb: Buffer) => { - //injb = Buffer.from("https://take-me-to.space/6C1a6s5.pee"); + // some badly encoded pngs can emit things after the last character, so we explicitely pad with a 0 + injb = Buffer.concat([injb, Buffer.from([0])]); if (!csettings) throw new Error("Settings uninit");