Skip to content

Commit

Permalink
Passed arguments everywhere to buffer.readUInt32BE() to avoid some er…
Browse files Browse the repository at this point in the history
…rors

webpack/node-libs-browser#93
Webpack 4 now is a stable version. It uses node-libs for Buffer polyfill that is not completely compatible with the nodejs implemintation. In node-libs a lot of optional arguments are required, so we get an offset error in the browser calling buffer.readUInt32BE without an argument.
  • Loading branch information
ortexx authored Sep 21, 2020
1 parent 9ed05f6 commit 3108fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ NodeID3.prototype.readPopularimeterFrame = function(frame) {
if(counterIndex < frame.length) {
let value = frame.slice(counterIndex, frame.length)
if(value.length >= 4) {
tags.counter = value.readUInt32BE()
tags.counter = value.readUInt32BE(0)
}
}
}
Expand Down Expand Up @@ -1266,4 +1266,4 @@ NodeID3.prototype.readChapterFrame = function(frame) {
}

return tags
}
}

0 comments on commit 3108fbd

Please sign in to comment.