X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8ee36fb78cf2262aff921b192707704aeed2bb5a..6e908fb81c5a1d66e80d71c7b4676cacb1d8e801:/module/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);