Skip to content

Commit

Permalink
feat: updating message length for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mbittarelli6river committed Feb 14, 2020
1 parent f73bed7 commit a8df0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/messageGeneration/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ fields.getPrimitiveSize = function(fieldType, fieldValue) {
}
else if (fieldType === 'string') {
if (fieldValue !== undefined) {
fieldSize = fieldValue.length + 4;
fieldSize = Buffer.byteLength(fieldValue, 'utf8') + 4;
}
}
else if (fieldType === 'time') {
Expand Down

0 comments on commit a8df0f6

Please sign in to comment.