diff options
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 30f5169a..f1471f0f 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -239,7 +239,7 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li | |||
239 | if (link->flags & gemini_GmLinkFlag && ~link->flags & remote_GmLinkFlag) { | 239 | if (link->flags & gemini_GmLinkFlag && ~link->flags & remote_GmLinkFlag) { |
240 | iChar icon = 0; | 240 | iChar icon = 0; |
241 | int len = 0; | 241 | int len = 0; |
242 | if ((len = decodeBytes_MultibyteChar(desc.start, size_Range(&desc), &icon)) > 0) { | 242 | if ((len = decodeBytes_MultibyteChar(desc.start, desc.end, &icon)) > 0) { |
243 | if (desc.start + len < desc.end && | 243 | if (desc.start + len < desc.end && |
244 | (isPictograph_Char(icon) || isEmoji_Char(icon) || icon == 0x2022 /* bullet */) && | 244 | (isPictograph_Char(icon) || isEmoji_Char(icon) || icon == 0x2022 /* bullet */) && |
245 | !isFitzpatrickType_Char(icon)) { | 245 | !isFitzpatrickType_Char(icon)) { |
@@ -1675,7 +1675,7 @@ iRangecc findLoc_GmRun(const iGmRun *d, iInt2 pos) { | |||
1675 | loc.end = loc.start; | 1675 | loc.end = loc.start; |
1676 | iChar ch; | 1676 | iChar ch; |
1677 | if (d->text.end != loc.start) { | 1677 | if (d->text.end != loc.start) { |
1678 | int chLen = decodeBytes_MultibyteChar(loc.start, d->text.end - loc.start, &ch); | 1678 | int chLen = decodeBytes_MultibyteChar(loc.start, d->text.end, &ch); |
1679 | if (chLen > 0) { | 1679 | if (chLen > 0) { |
1680 | /* End after the character. */ | 1680 | /* End after the character. */ |
1681 | loc.end += chLen; | 1681 | loc.end += chLen; |