Opened 12 years ago

Closed 9 years ago

#146 closed defect (fixed)

GRD vertical grid reading assumes two whitespace characters between each number

Reported by: paulAtSafe Owned by: Norm Olsen
Priority: minor Milestone: 3.0
Component: Library Version: svn-trunk
Keywords: Cc:

Description

The code that reads floating-point numbers from GRD files assumes there are multiple whitespace characters between each number.

For example, a line like this:

1.2345 -2.3456

will read two numbers: 1.2345 and (positive) 2.3456

To reproduce, remove extra whitespace from the shipped WW15MGH.GRD file and attempt to apply the EGM96 grid. It will fail to load (the first time only - but the ._96 file produced will be empty and no grid shifts will be applied after that).

I've attached a patch which resolves this issue.

Attachments (1)

double_reading.patch (915 bytes ) - added by paulAtSafe 12 years ago.
patch

Download all attachments as: .zip

Change History (5)

by paulAtSafe, 12 years ago

Attachment: double_reading.patch added

patch

comment:1 by paulAtSafe, 12 years ago

Component: DictionariesLibrary

comment:2 by Norm Olsen, 9 years ago

Owner: changed from hugueswski to Norm Olsen

comment:3 by Norm Olsen, 9 years ago

Corrected at revision 2675. Clearly a coding error in the CS_extractDbl function in the CS_general.c module as reported by the user. The provided patch file was used as the basis of the correction, but could not be used directly as the patch file was out of date at this time.

comment:4 by Norm Olsen, 9 years ago

Milestone: 3.0
Resolution: fixed
Status: newclosed
Version: svn-trunk
Note: See TracTickets for help on using tickets.