]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Ahem. Global replace of `cfg' with `inst->cfg' is all very well, but
authorSimon Tatham <anakin@pobox.com>
Sun, 12 Jan 2003 15:36:05 +0000 (15:36 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 12 Jan 2003 15:36:05 +0000 (15:36 +0000)
let's try to make sure it doesn't happen inside any strings! The
-cfg option for cursor foreground colour nearly had a nasty accident
there.

[originally from svn r2569]

unix/pterm.c

index a5367a0b37b0c8cee4d121a20bc8af8bd238a705..cc6b2d0536a017aed9f832001ecba313bd346de7 100644 (file)
@@ -2061,7 +2061,7 @@ int do_cmdline(int argc, char **argv, int do_everything, Config *cfg)
 
        } else if (!strcmp(p, "-fg") || !strcmp(p, "-bg") ||
                   !strcmp(p, "-bfg") || !strcmp(p, "-bbg") ||
-                  !strcmp(p, "-inst->cfg") || !strcmp(p, "-cbg")) {
+                  !strcmp(p, "-cfg") || !strcmp(p, "-cbg")) {
            GdkColor col;
 
            EXPECTS_ARG;
@@ -2075,7 +2075,7 @@ int do_cmdline(int argc, char **argv, int do_everything, Config *cfg)
                         !strcmp(p, "-bg") ? 2 :
                         !strcmp(p, "-bfg") ? 1 :
                         !strcmp(p, "-bbg") ? 3 :
-                        !strcmp(p, "-inst->cfg") ? 4 :
+                        !strcmp(p, "-cfg") ? 4 :
                         !strcmp(p, "-cbg") ? 5 : -1);
                assert(index != -1);
                cfg->colours[index][0] = col.red / 256;