Skip to content

Commit

Permalink
fix #1523 (r10084 was actually fixing #1516)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10094 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 2, 2009
1 parent 6f8d310 commit f6bda8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/plugins/spit/qgsdbfbase.h
Expand Up @@ -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];
Expand All @@ -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];
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/spit/qgsshapefile.cpp
Expand Up @@ -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" );
Expand Down

0 comments on commit f6bda8b

Please sign in to comment.