From fc2838d54370e39e89f74941ab530ae15d10ef54 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 15 Jan 2004 09:57:07 +0000 Subject: [PATCH] field type array allocates num_fields * sizeof(int) instead of sizeof(char*) git-svn-id: http://svn.osgeo.org/postgis/trunk@426 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shp2pgsql.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index be321a843..0b6f03a40 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -12,6 +12,9 @@ * ********************************************************************** * $Log$ + * Revision 1.46 2004/01/15 09:57:07 strk + * field type array allocates num_fields * sizeof(int) instead of sizeof(char*) + * * Revision 1.45 2004/01/02 20:11:41 strk * always call setval with no schema specification. drop 'database' argument using the empty string to the AddGeometryColumn call * @@ -704,7 +707,7 @@ int main (int ARGC, char **ARGV){ num_fields = DBFGetFieldCount( hDBFHandle ); num_records = DBFGetRecordCount(hDBFHandle); names = malloc(num_fields*sizeof(char*)); - types = (DBFFieldType *)malloc(num_fields*sizeof(char*)); + types = (DBFFieldType *)malloc(num_fields*sizeof(int)); widths = malloc(num_fields*sizeof(int)); precisions = malloc(num_fields*sizeof(int)); col_names = malloc(num_fields * sizeof(char) * 32); -- 2.50.1