diff options
| author | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2020-02-20 08:58:08 +0000 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-02-20 19:24:19 +0100 |
| commit | 2be384c5ac96d704c618ac098e3adc97072a0b71 (patch) | |
| tree | 7189e4c3622a51f6b2262e9b320a6f7afd6e6468 /src/grids.cpp | |
| parent | 8cf7204f89c182683d7c4960fa11539143902fd2 (diff) | |
| download | PROJ-2be384c5ac96d704c618ac098e3adc97072a0b71.tar.gz PROJ-2be384c5ac96d704c618ac098e3adc97072a0b71.zip | |
Fix wrong byte-swapping for NTv2 grids affecting master after RFC4 work (fixes #1938)
Diffstat (limited to 'src/grids.cpp')
| -rw-r--r-- | src/grids.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/grids.cpp b/src/grids.cpp index ec447a33..ee5ecf52 100644 --- a/src/grids.cpp +++ b/src/grids.cpp @@ -1899,7 +1899,10 @@ std::unique_ptr<NTv2GridSet> NTv2GridSet::open(PJ_CONTEXT *ctx, if (must_swap) { // 6 double values: southLat, northLat, eastLon, westLon, resLat, // resLon - swap_words(header + OFFSET_SOUTH_LAT, sizeof(double), 6); + for (int i = 0; i < 6; i++) { + swap_words(header + OFFSET_SOUTH_LAT + 16 * i, sizeof(double), + 1); + } swap_words(header + OFFSET_GS_COUNT, sizeof(int), 1); } |
