[Gdal-dev] Assertion in .tab driver
Daniel
daniel112b at gmail.com
Wed Jun 13 12:46:05 EDT 2007
Hello,
If you build GDAL against the debug version of the c-runtime with
Visual Studio 2005 (/MDd) and try to open a .tab file with 8-bit ASCII
characters in it, the field names for instance, you get an assert in
isspace on row 177 in
http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/mitab/mitab_imapinfofile.cpp
The parameter passed to isspace is a signed char which is converted to
a signed int so any values >127 will become negative. It seems to work
fine when built against the release libraries and if you ignore the
assert it seems to work so this is probably nothing serious maybe
depending on the locale that is used. It can easily be fixed by
casting the char to an unsigend char before passing it to isspace:
isspace((unsigned char)*pszLine)
Regards,
Daniel Bäck
More information about the Gdal-dev
mailing list