From ee0d6b453354e2beb68f541ce2b84925e7ca530f Mon Sep 17 00:00:00 2001 From: Lucian Buzzo Date: Sun, 5 Feb 2017 12:45:55 +0000 Subject: [PATCH] Fixed issue where terminal would become unusable if NaN values are sent to resize method. --- src/xterm.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xterm.js b/src/xterm.js index 560db5f..0a8c2a1 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -1973,6 +1973,10 @@ Terminal.prototype.error = function() { * @param {number} y The number of rows to resize to. */ Terminal.prototype.resize = function(x, y) { + if (Number.isNaN(x) || Number.isNaN(y)) { + return; + } + var line , el , i