diff options
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r-- | src/libserver/protocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index c457fc455..e66101bb4 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -925,11 +925,11 @@ urls_protocol_cb (gpointer key, gpointer value, gpointer ud) goffset err_offset; - if ((err_offset = rspamd_fast_utf8_validate (url->host, url->hostlen) == 0)) { + if ((err_offset = rspamd_fast_utf8_validate (url->host, url->hostlen)) == 0) { obj = ucl_object_fromlstring (url->host, url->hostlen); } else { - obj = ucl_object_fromlstring (url->host, err_offset); + obj = ucl_object_fromlstring (url->host, err_offset - 1); } } else { |