From: Neil Rickards Date: Sun, 25 Feb 2018 23:07:53 +0000 (+0100) Subject: Update nominatim.c X-Git-Tag: v3.2.0~119^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/4daa584b7d499cb6f1b7a873247b56b7f8cfb74d?ds=inline Update nominatim.c --- diff --git a/module/nominatim.c b/module/nominatim.c index a0d8c5ae..73bf16c8 100644 --- a/module/nominatim.c +++ b/module/nominatim.c @@ -168,7 +168,7 @@ void str_replace(char* buffer, int* len, int* changes, char* from, int fromlen, p = strstr(buffer, from); while(p) { - if (!isspace || p == buffer || *(p-1) != ' ') + if (!isspace || (p > buffer && *(p-1) != ' ')) { (*changes)++; if (tolen != fromlen) memmove(p+tolen, p+fromlen, *len-(p-buffer)+1);