X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Ftic.c;h=763c2b790a0e9cac6fc4524275a0657d7084b26c;hp=618419c847ce5300104f99b998de7d00a7376069;hb=6434e809cb70f93cc76d0f833e74447e32c99f54;hpb=83e9a85c4205c920cc9992bfc96f6546cd4fff22 diff --git a/progs/tic.c b/progs/tic.c index 618419c8..763c2b79 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.207 2014/06/15 00:36:45 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.208 2014/10/18 09:34:29 tom Exp $") #define STDIN_NAME "" @@ -1891,12 +1891,15 @@ same_ti_tc(const char *ti, const char *tc, bool * embedded) * Check terminfo to termcap translation. */ static void -check_infotocap(TERMTYPE *tp, int i, char *value) +check_infotocap(TERMTYPE *tp, int i, const char *value) { const char *name = ExtStrname(tp, i, strnames); - int params = ((i < (int) SIZEOF(parametrized)) + int params = (((i < (int) SIZEOF(parametrized)) && + (i < STRCOUNT)) ? parametrized[i] - : 0); + : ((*value == 'k') + ? 0 + : has_params(value))); int to_char = 0; char *ti_value; char *tc_value;