diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-01-20 16:16:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-20 16:16:10 +0100 |
| commit | a4ec5e49bbcf3de1c779c3ed13389def99dd6a4e (patch) | |
| tree | 179b4b60d3e387d3f8ba528db73c8e348819bd70 /src/init.cpp | |
| parent | aba9c7747fc47bbc6f0ec6e6957449ea5090c5fc (diff) | |
| parent | 53a8cbbec1a6c9c644b35da86bc26a33ff1279e0 (diff) | |
| download | PROJ-a4ec5e49bbcf3de1c779c3ed13389def99dd6a4e.tar.gz PROJ-a4ec5e49bbcf3de1c779c3ed13389def99dd6a4e.zip | |
Merge pull request #1230 from rouault/space_in_grid_names
Add support for spaces in grid name parameters (fixes #1152)
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/init.cpp b/src/init.cpp index 8af3d26c..482e398d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -48,27 +48,19 @@ static paralist *string_to_paralist (PJ_CONTEXT *ctx, char *definition) { /*************************************************************************************** Convert a string (presumably originating from get_init_string) to a paralist. ***************************************************************************************/ - char *c = definition; + const char *c = definition; paralist *first = nullptr, *next = nullptr; while (*c) { - /* Find start of next substring */ - while (isspace (*c)) - c++; - /* Keep a handle to the start of the list, so we have something to return */ if (nullptr==first) - first = next = pj_mkparam_ws (c); + first = next = pj_mkparam_ws (c, &c); else - next = next->next = pj_mkparam_ws (c); + next = next->next = pj_mkparam_ws (c, &c); if (nullptr==next) { pj_dealloc_params (ctx, first, ENOMEM); return nullptr; } - - /* And skip to the end of the substring */ - while ((!isspace(*c)) && 0!=*c) - c++; } if( next == nullptr ) |
