mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Update nominatim.c
This commit is contained in:
@@ -168,7 +168,7 @@ void str_replace(char* buffer, int* len, int* changes, char* from, int fromlen,
|
|||||||
p = strstr(buffer, from);
|
p = strstr(buffer, from);
|
||||||
while(p)
|
while(p)
|
||||||
{
|
{
|
||||||
if (!isspace || p == buffer || *(p-1) != ' ')
|
if (!isspace || (p > buffer && *(p-1) != ' '))
|
||||||
{
|
{
|
||||||
(*changes)++;
|
(*changes)++;
|
||||||
if (tolen != fromlen) memmove(p+tolen, p+fromlen, *len-(p-buffer)+1);
|
if (tolen != fromlen) memmove(p+tolen, p+fromlen, *len-(p-buffer)+1);
|
||||||
|
|||||||
Reference in New Issue
Block a user