lagrange: update to 1.7.1.

This commit is contained in:
Michal Vasilek 2021-10-03 18:43:58 +02:00
parent 2eb270403e
commit 2ef364b467
2 changed files with 3 additions and 29 deletions

View file

@ -1,26 +0,0 @@
From 1fe2b10bc1a2def2af86390272907206f819b7ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= <jaakko.keranen@iki.fi>
Date: Sun, 3 Oct 2021 08:02:58 +0300
Subject: [PATCH] GmDocument: Fixed a crash when selecting text
---
src/gmdocument.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 22f409a..2f4c797 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -2074,8 +2074,11 @@ iRangecc findLoc_GmRun(const iGmRun *d, iInt2 pos) {
iRangecc loc;
tryAdvanceNoWrap_Text(d->textParams.font, d->text, x, &loc.start);
loc.end = loc.start;
+ if (!contains_Range(&d->text, loc.start)) {
+ return iNullRange; /* it's some other text */
+ }
iChar ch;
- if (d->text.end != loc.start) {
+ if (d->text.end && d->text.end != loc.start) {
int chLen = decodeBytes_MultibyteChar(loc.start, d->text.end, &ch);
if (chLen > 0) {
/* End after the character. */

View file

@ -1,7 +1,7 @@
# Template file for 'lagrange'
pkgname=lagrange
version=1.6.5
revision=2
version=1.7.1
revision=1
build_style=cmake
hostmakedepends="pkg-config"
makedepends="pcre-devel SDL2-devel openssl-devel zlib-devel libunistring-devel
@ -12,7 +12,7 @@ license="BSD-2-Clause"
homepage="https://gmi.skyjake.fi/lagrange/"
changelog="https://git.skyjake.fi/skyjake/lagrange/raw/branch/dev/res/about/version.gmi"
distfiles="https://git.skyjake.fi/skyjake/lagrange/releases/download/v$version/lagrange-$version.tar.gz"
checksum=c971850414aefad2e5f38659c173cdc2f765bfcf158a32c84b5c61294558b00f
checksum=f43800fbfa99c15233a5dc5333f6d981b9a6139ff354c664213a04b3d6250703
post_install() {
vlicense LICENSE.md