fix terminfo operators. fixes #19.

This commit is contained in:
Christopher Jeffrey 2013-08-29 17:46:20 -05:00
parent 97b6d6faee
commit a14650860d

View File

@ -984,7 +984,9 @@ Tput.prototype._compile = function(info, key, str) {
if (read(/^%([+\-*\/m&|\^=><])/)) {
if (ch === '=') ch = '===';
else if (ch === 'm') ch = '%';
expr('(stack.push(v = (stack.pop() ' + ch + ' stack.pop()) || 0), v)');
expr('(v = stack.pop(),'
+ ' stack.push(v = (stack.pop() ' + ch + ' v) || 0),'
+ ' v)');
continue;
}