Skip to content
Permalink
Browse files

fix #1523 (r10084 was actually fixing #1516)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10094 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 2, 2009
1 parent 9b08521 commit 4becbc3839d88548d66448a43936f35cd7bc41bd
Showing with 12 additions and 5 deletions.
  1. +10 −4 src/plugins/spit/qgsdbfbase.h
  2. +2 −1 src/plugins/spit/qgsshapefile.cpp
@@ -15,16 +15,22 @@
/* $Id$ */

// Dbase header structure
#ifndef _MSC_VER
#include <stdint.h>
#else
typedef __int32 int32_t;
typedef __int16 int16_t;
#endif

struct DbaseHeader
{
unsigned char valid_dbf;
char year;
char month;
char day;
long num_recs;
short size_hdr;
short size_rec;
int32_t num_recs;
int16_t size_hdr;
int16_t size_rec;
char reserved[3];
char lan[13];
char reserved2[4];
@@ -35,7 +41,7 @@ struct FieldDescriptorArray
{
char field_name[11];
char field_type;
long field_addr; /* used only in memory */
int32_t field_addr; /* used only in memory */
unsigned char field_length;
unsigned char field_decimal;
char reserved[2];
@@ -207,7 +207,8 @@ QString QgsShapeFile::getFeatureClass()
dbf.read(( char * )&fda, sizeof( fda ) );
switch ( fda.field_type )
{
case 'N': if (( int )fda.field_decimal > 0 )
case 'N':
if (( int )fda.field_decimal > 0 )
column_types.push_back( "float" );
else
column_types.push_back( "int" );

0 comments on commit 4becbc3

Please sign in to comment.
You can’t perform that action at this time.