ibm->ansi attribute conversion was inverted (fg<->bg)
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 9 Feb 2019 08:53:10 +0000 (10:53 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 9 Feb 2019 08:53:10 +0000 (10:53 +0200)
src/ansi.c

index c0af0c4..ac5185f 100644 (file)
@@ -85,8 +85,8 @@ void ansi_ibmchar(unsigned char c, unsigned char attr)
        }
 
        if(attr != cur_attr) {
-               unsigned char fg = cmap[attr & 7];
-               unsigned char bg = cmap[(attr >> 4) & 7];
+               unsigned char bg = cmap[attr & 7];
+               unsigned char fg = cmap[(attr >> 4) & 7];
 
                ptr += sprintf(ptr, "\033[;%d;%dm", fg + 30, bg + 40);
                cur_attr = attr;