Buffer.alloc should be .from
This commit is contained in:
parent
b45a6a8743
commit
f692c593e7
|
@ -78,7 +78,7 @@ module.exports = class ArchiveUtil {
|
||||||
Object.keys(Config.fileTypes).forEach(mimeType => {
|
Object.keys(Config.fileTypes).forEach(mimeType => {
|
||||||
const fileType = Config.fileTypes[mimeType];
|
const fileType = Config.fileTypes[mimeType];
|
||||||
if(fileType.sig) {
|
if(fileType.sig) {
|
||||||
fileType.sig = Buffer.alloc(fileType.sig, 'hex');
|
fileType.sig = Buffer.from(fileType.sig, 'hex');
|
||||||
fileType.offset = fileType.offset || 0;
|
fileType.offset = fileType.offset || 0;
|
||||||
|
|
||||||
// :TODO: this is broken: sig is NOT this long, it's sig.length long; offset needs to allow for -negative values as well
|
// :TODO: this is broken: sig is NOT this long, it's sig.length long; offset needs to allow for -negative values as well
|
||||||
|
|
Loading…
Reference in New Issue