mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against de679af492ed93d70c99dff7f7cfc01cc8f25eb0.
This commit is contained in:
parent
601cfd7fdb
commit
80498dd440
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "e909986e6ea5ecd49b2b847f321ad89b2ae4f6f1"
|
||||
echo "de679af492ed93d70c99dff7f7cfc01cc8f25eb0"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -3545,11 +3545,10 @@ fi
|
||||
# Patchset riched20-IText_Interface
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/riched20/richole.c, dlls/riched20/run.c, dlls/riched20/tests/richole.c
|
||||
# | * dlls/riched20/richole.c, dlls/riched20/tests/richole.c
|
||||
# |
|
||||
if test "$enable_riched20_IText_Interface" -eq 1; then
|
||||
patch_apply riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch
|
||||
patch_apply riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch
|
||||
patch_apply riched20-IText_Interface/0010-riched20-Silence-repeated-FIXMEs-triggered-by-Adobe-.patch
|
||||
fi
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 9dee4d943b4dbbc64dbdaaf9052c094a6bb27ff3 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Wed, 13 Aug 2014 14:57:52 +0800
|
||||
Subject: riched20: Fix ME_RunOfsFromCharOfs() when nCharOfs > strlen().
|
||||
|
||||
---
|
||||
dlls/riched20/run.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
|
||||
index 38d0270..ad08b82 100644
|
||||
--- a/dlls/riched20/run.c
|
||||
+++ b/dlls/riched20/run.c
|
||||
@@ -181,9 +181,10 @@ void ME_RunOfsFromCharOfs(ME_TextEditor *editor,
|
||||
int *pOfs)
|
||||
{
|
||||
ME_DisplayItem *item, *next_item;
|
||||
+ int endOfs = nCharOfs, len = ME_GetTextLength(editor);
|
||||
|
||||
nCharOfs = max(nCharOfs, 0);
|
||||
- nCharOfs = min(nCharOfs, ME_GetTextLength(editor));
|
||||
+ nCharOfs = min(nCharOfs, len);
|
||||
|
||||
/* Find the paragraph at the offset. */
|
||||
next_item = editor->pBuffer->pFirst->member.para.next_para;
|
||||
@@ -206,7 +207,11 @@ void ME_RunOfsFromCharOfs(ME_TextEditor *editor,
|
||||
nCharOfs -= item->member.run.nCharOfs;
|
||||
|
||||
if (ppRun) *ppRun = item;
|
||||
- if (pOfs) *pOfs = nCharOfs;
|
||||
+ if (pOfs) {
|
||||
+ if (((*ppRun)->member.run.nFlags & MERF_ENDPARA) && endOfs > len)
|
||||
+ *pOfs = (*ppRun)->member.run.len;
|
||||
+ else *pOfs = nCharOfs;
|
||||
+ }
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
--
|
||||
2.4.2
|
||||
|
@ -1 +1 @@
|
||||
e909986e6ea5ecd49b2b847f321ad89b2ae4f6f1
|
||||
de679af492ed93d70c99dff7f7cfc01cc8f25eb0
|
||||
|
Loading…
Reference in New Issue
Block a user