diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-02 20:50:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-02 20:55:10 +0100 |
commit | 1d3c9379b9044a59e3db06697f9967ba88137a1d (patch) | |
tree | baa9cfff3b9b8cdde0a9ed28084052e12e02c7b1 /src/lua/lua_mimepart.c | |
parent | 141617dab47bf741af4578c656d4cda5f18742ed (diff) | |
download | rspamd-1d3c9379b9044a59e3db06697f9967ba88137a1d.tar.gz rspamd-1d3c9379b9044a59e3db06697f9967ba88137a1d.zip |
[Rework] Html: Deal with the utf_content part
Diffstat (limited to 'src/lua/lua_mimepart.c')
-rw-r--r-- | src/lua/lua_mimepart.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c index fe8bb4246..b6e5b157d 100644 --- a/src/lua/lua_mimepart.c +++ b/src/lua/lua_mimepart.c @@ -694,8 +694,8 @@ lua_textpart_get_content (lua_State * L) lua_pushnil (L); return 1; } - start = part->utf_content->data; - len = part->utf_content->len; + start = part->utf_content.begin; + len = part->utf_content.len; } else if (strcmp (type, "content") == 0) { if (IS_TEXT_PART_EMPTY (part)) { @@ -703,8 +703,8 @@ lua_textpart_get_content (lua_State * L) return 1; } - start = part->utf_content->data; - len = part->utf_content->len; + start = part->utf_content.begin; + len = part->utf_content.len; } else if (strcmp (type, "content_oneline") == 0) { if (IS_TEXT_PART_EMPTY (part)) { @@ -809,11 +809,11 @@ lua_textpart_get_length (lua_State * L) return 1; } - if (IS_TEXT_PART_EMPTY (part) || part->utf_content == NULL) { + if (IS_TEXT_PART_EMPTY (part) || part->utf_content.len == 0) { lua_pushinteger (L, 0); } else { - lua_pushinteger (L, part->utf_content->len); + lua_pushinteger (L, part->utf_content.len); } return 1; |