]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/write_entry.c
ncurses 5.9 - patch 20130928
[ncurses.git] / ncurses / tinfo / write_entry.c
index 45f315977daad89f7be3534ba7d39d61c926cd5d..931a0b6addb08e92561c345c0521fb6a7446d302 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -47,7 +47,7 @@
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.87 2012/12/29 23:12:22 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.89 2013/09/28 20:20:30 tom Exp $")
 
 static int total_written;
 
@@ -273,7 +273,7 @@ _nc_write_entry(TERMTYPE *const tp)
     char name_list[MAX_TERMINFO_LENGTH];
     char *first_name, *other_names;
     char *ptr;
-    const char *term_names = tp->term_names;
+    char *term_names = tp->term_names;
     size_t name_size = strlen(term_names);
 
     if (name_size == 0) {
@@ -333,7 +333,7 @@ _nc_write_entry(TERMTYPE *const tp)
            buffer[0] = 2;
 
            key.data = name_list;
-           key.size = name_size;
+           key.size = strlen(name_list);
 
            _nc_STRCPY(buffer + 1,
                       term_names,