Update nominatim.c

This commit is contained in:
Neil Rickards
2018-02-26 00:07:53 +01:00
committed by GitHub
parent 8ee36fb78c
commit 4daa584b7d

View File

@@ -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);