Skip to content

Commit

Permalink
mapxbase: simplify fieldname assignment to pszFInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
gogglesguy committed Aug 20, 2018
1 parent c59ab11 commit 738ea6d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mapxbase.c
Expand Up @@ -447,10 +447,7 @@ int msDBFAddField(DBFHandle psDBF, const char * pszFieldName, DBFFieldType eType
for( i = 0; i < 32; i++ )
pszFInfo[i] = '\0';

if( strlen(pszFieldName) < 10 )
strncpy( pszFInfo, pszFieldName, strlen(pszFieldName));
else
strncpy( pszFInfo, pszFieldName, 10);
strncpy( pszFInfo, pszFieldName, 10);

pszFInfo[11] = psDBF->pachFieldType[psDBF->nFields-1];

Expand Down

0 comments on commit 738ea6d

Please sign in to comment.