state->dbffieldtypes = NULL;
state->pgfieldnames = NULL;
state->big_endian = is_bigendian();
+ state->message[0] = '\0';
colmap_init(&state->column_map);
return state;
/* Issue warning if column has been renamed */
if (strcasecmp(dbffieldname, pgfieldname))
{
- /* Note: we concatenate all warnings from the main loop as this is useful information */
snprintf(buf, 256, _("Warning, field %s renamed to %s\n"), pgfieldname, dbffieldname);
- strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message));
+ /* Note: we concatenate all warnings from the main loop as this is useful information */
+ strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message) - 1);
ret = SHPDUMPERWARN;
}