diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-01-19 17:49:05 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-01-19 18:04:49 +0100 |
| commit | 53a8cbbec1a6c9c644b35da86bc26a33ff1279e0 (patch) | |
| tree | 55d63a43afb891c0523a5d16d8a7bd6281e4e9c7 /src/init.cpp | |
| parent | 1a2ce997b7b7f360110d20538aa15a64fcb61f5f (diff) | |
| download | PROJ-53a8cbbec1a6c9c644b35da86bc26a33ff1279e0.tar.gz PROJ-53a8cbbec1a6c9c644b35da86bc26a33ff1279e0.zip | |
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 ) |
