X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_scan.c;h=48d3300287cfce8a9be1c17ae4be9c46966dc161;hp=bfbb0e25e9f50c6040be9a622ad7c43d08772007;hb=96d6b16de0d487e5d3aed0302a179dbce11b5d96;hpb=92e187a3459ab7ce1613a3684ca6642447c73620 diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index bfbb0e25..48d33002 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -50,7 +50,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.87 2010/05/01 19:56:35 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.88 2010/08/28 19:26:09 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -203,6 +203,10 @@ next_char(void) if (fgets(result + used, (int) (allocated - used), yyin) != 0) { bufstart = result; if (used == 0) { + if (_nc_curr_line == 0 + && IS_TIC_MAGIC(result)) { + _nc_err_abort("This is a compiled terminal description, not a source"); + } _nc_curr_line++; _nc_curr_col = 0; }