do not gracefully handle bad parse errors.

This commit is contained in:
Christopher Jeffrey 2013-03-06 04:03:07 -06:00
parent 134ebe28c0
commit 78c2803523
1 changed files with 2 additions and 10 deletions

View File

@ -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.