Skip to content

Commit b5e5345

Browse files
committed
Address Buffer deprecation
1 parent 9c92099 commit b5e5345

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ip2proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ var MSG_IPV6_UNSUPPORTED = "IPV6 ADDRESS MISSING IN IPV4 BIN";
9090

9191
// Read binary data
9292
function readbin(readbytes, pos, readtype, isbigint) {
93-
var buff = new Buffer(readbytes);
93+
var buff = new Buffer.alloc(readbytes);
9494
totalread = fs.readSync(fd, buff, 0, readbytes, pos);
9595

9696
if (totalread == readbytes) {

0 commit comments

Comments
 (0)