Skip to content

Commit

Permalink
String output: The "size" argument must be of type number.
Browse files Browse the repository at this point in the history
  • Loading branch information
PLCHome committed Apr 27, 2019
1 parent 6d08012 commit da23080
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ var getBytesFromHandle = function (handle) {
buf.writeDoubleLE(val, offset)
break
case 'STRING':
var stringbuf = Buffer.alloc(val.toString().slice(0,convert.length-1) + '\0', 'binary')
var stringbuf = Buffer.from(val.toString().slice(0,convert.length-1) + '\0', 'binary')
stringbuf.copy(buf, offset)
break
case 'TIME':
Expand Down

0 comments on commit da23080

Please sign in to comment.