X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_terminfo.c;h=3b44a0bbcff445018a4f344ada172e4a1a138481;hp=b4466168fa6dc0710f354608bbd6fb0e0c8ae408;hb=6434e809cb70f93cc76d0f833e74447e32c99f54;hpb=d7e4a265b50f6fddbad20ea238fdc05a35cbdc2f diff --git a/test/demo_terminfo.c b/test/demo_terminfo.c index b4466168..3b44a0bb 100644 --- a/test/demo_terminfo.c +++ b/test/demo_terminfo.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_terminfo.c,v 1.37 2014/09/05 08:44:49 tom Exp $ + * $Id: demo_terminfo.c,v 1.38 2014/10/10 00:35:28 tom Exp $ * * A simple demo of the terminfo interface. */ @@ -453,6 +453,7 @@ parse_description(const char *input_name) if ((fp = fopen(input_name, "r")) == 0) failed("cannot open input-file"); len = fread(my_blob, sizeof(char), (size_t) sb.st_size, fp); + my_blob[sb.st_size] = '\0'; fclose(fp); /*