Skip to content
Snippets Groups Projects
Commit 6ae433ba authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't throw an exeption when ESC[u used before ESC[s

This should fix error:
graphic.js line 395: TypeError: y is undefined
parent 98ac0593
No related branches found
No related tags found
No related merge requests found
/* /*
* "Graphic" object * "Graphic" object
* Allows a graphic to be stored in memory and portions of it redrawn on command * Allows a graphic to be stored in memory and portions of it redrawn on command
* @format.tab-size 4, @format.use-tabs true
*/ */
require("userdefs.js", "USER_ICE_COLOR"); require("userdefs.js", "USER_ICE_COLOR");
...@@ -326,7 +327,9 @@ Object.defineProperty(Graphic.prototype, "ANSI", { ...@@ -326,7 +327,9 @@ Object.defineProperty(Graphic.prototype, "ANSI", {
saved={'x':x, 'y':y}; saved={'x':x, 'y':y};
}, },
'u':function(params) { 'u':function(params) {
if (saved.x !== undefined)
x = saved.x; x = saved.x;
if (saved.y !== undefined)
y = saved.y; y = saved.y;
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment