Skip to content

Commit 01e1bf1

Browse files
committed
Missing one file
1 parent d734d08 commit 01e1bf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/parsers/text_parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function compile(fields, options, config) {
9595
parserFn('const _this = this;');
9696
for(let i=0; i<fields.length; ++i) {
9797
const field = fields[i];
98-
const encodingExpr = `fields[${i}].encoding`;
98+
const encodingExpr = helpers.srcEscape(field.encoding);
9999
const readCode = readCodeFor(
100100
fields[i].columnType,
101101
fields[i].characterSet,
@@ -110,7 +110,7 @@ function compile(fields, options, config) {
110110
table: ${helpers.srcEscape(field.table)},
111111
name: ${helpers.srcEscape(field.name)},
112112
string: function() {
113-
return _this.packet.readLengthCodedString(${helpers.srcEscape(field.encoding)});
113+
return _this.packet.readLengthCodedString(${encodingExpr});
114114
},
115115
buffer: function() {
116116
return _this.packet.readLengthCodedBuffer();

0 commit comments

Comments
 (0)