]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_terminfo.c
ncurses 5.9 - patch 20120630
[ncurses.git] / test / demo_terminfo.c
index ebca898a80b2f7d10f31b95b1b83f60e347a5a5e..fd3362c2df2c81b594c282d892def57ab7688902 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: demo_terminfo.c,v 1.11 2012/06/22 23:04:03 tom Exp $
+ * $Id: demo_terminfo.c,v 1.12 2012/06/30 22:03:22 tom Exp $
  *
  * A simple demo of the terminfo interface.
  */
@@ -69,7 +69,7 @@ static long total_values;
 static char *
 make_dbitem(char *p, char *q)
 {
-    char *result = malloc(strlen(e_opt) + 2 + p - q);
+    char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
     sprintf(result, "%s=%.*s", e_opt, p - q, q);
     return result;
 }