]> git.openstreetmap.org Git - nominatim.git/blobdiff - module/nominatim.c
README: tiny markdown syntax error
[nominatim.git] / module / nominatim.c
index a0d8c5aeb33d2fbf628d3eab1c0072ece4f59158..73bf16c8df487eac4d462621fe566534e6476621 100644 (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);