mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-09 18:45:51 +00:00
do not gracefully handle bad parse errors.
This commit is contained in:
parent
134ebe28c0
commit
78c2803523
12
lib/tput.js
12
lib/tput.js
@ -223,11 +223,7 @@ Tput.prototype.parseTerminfo = function(data) {
|
||||
|
||||
while (data[j]) j++;
|
||||
|
||||
// assert.ok(j < data.length, 'Expected ' + j + ' < ' + data.length);
|
||||
if (j >= data.length) {
|
||||
delete info.strings[key];
|
||||
return;
|
||||
}
|
||||
assert(j < data.length);
|
||||
|
||||
info.strings[key] = data.toString('ascii', s, j);
|
||||
});
|
||||
@ -376,11 +372,7 @@ Tput.prototype.parseExtended = function(data) {
|
||||
|
||||
while (data[j]) j++;
|
||||
|
||||
// assert.ok(j < data.length, 'Expected ' + j + ' < ' + data.length);
|
||||
if (j >= data.length) {
|
||||
_strings[k] = '';
|
||||
return;
|
||||
}
|
||||
assert(j < data.length);
|
||||
|
||||
// Find out where the string table ends by
|
||||
// getting the highest string length.
|
||||
|
Loading…
x
Reference in New Issue
Block a user