ansilove.js

A script to display ANSi and artscene related file formats on web pages
Log | Files | Refs | README | LICENSE

commit 2570778e1593b8bafb5992e202881c6b36ca2e12
parent 2080fe5304db2ba83316fbc08b7f9963a4fd4f2c
Author: Andy Herbert <andy.herbert@gmail.com>
Date:   Sun,  3 Nov 2013 13:44:58 +0000

Include sanity check when setting the width of the textmode-display from a sauce record.

Diffstat:
Mansilove.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ansilove.js b/ansilove.js @@ -1037,7 +1037,7 @@ var AnsiLove = (function () { escapeCode = ""; escaped = false; - if (file.sauce) { + if (file.sauce && file.sauce.tInfo1 > 0) { columns = file.sauce.tInfo1; } else if (options.mode === "ced") { columns = 78; @@ -1395,7 +1395,7 @@ var AnsiLove = (function () { palette = Palette.ANSI; } - if (file.sauce) { + if (file.sauce && file.sauce.tInfo1 > 0) { columns = file.sauce.tInfo1; } else if (options.mode === "ced") { columns = 78;