|
|
8bac60 |
From bdfe457a2c1b47209e32783b3a6447e81baf179a Mon Sep 17 00:00:00 2001
|
|
|
8bac60 |
From: Stanislav Malyshev <stas@php.net>
|
|
|
8bac60 |
Date: Mon, 16 Feb 2015 06:50:10 +0100
|
|
|
8bac60 |
Subject: [PATCH] Port for for bug #68552
|
|
|
8bac60 |
|
|
|
8bac60 |
---
|
|
|
8bac60 |
NEWS | 6 ++++++
|
|
|
8bac60 |
ext/enchant/enchant.c | 7 +++----
|
|
|
8bac60 |
2 files changed, 9 insertions(+), 4 deletions(-)
|
|
|
8bac60 |
|
|
|
8bac60 |
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
|
|
|
8bac60 |
index 6de2fea..0eb8144 100644
|
|
|
8bac60 |
--- a/ext/enchant/enchant.c
|
|
|
8bac60 |
+++ b/ext/enchant/enchant.c
|
|
|
8bac60 |
@@ -550,13 +550,12 @@ PHP_FUNCTION(enchant_broker_request_dict)
|
|
|
8bac60 |
|
|
|
8bac60 |
d = enchant_broker_request_dict(pbroker->pbroker, (const char *)tag);
|
|
|
8bac60 |
if (d) {
|
|
|
8bac60 |
+ pos = pbroker->dictcnt++;
|
|
|
8bac60 |
if (pbroker->dictcnt) {
|
|
|
8bac60 |
pbroker->dict = (enchant_dict **)erealloc(pbroker->dict, sizeof(enchant_dict *) * pbroker->dictcnt);
|
|
|
8bac60 |
- pos = pbroker->dictcnt++;
|
|
|
8bac60 |
} else {
|
|
|
8bac60 |
pbroker->dict = (enchant_dict **)emalloc(sizeof(enchant_dict *));
|
|
|
8bac60 |
pos = 0;
|
|
|
8bac60 |
- pbroker->dictcnt++;
|
|
|
8bac60 |
}
|
|
|
8bac60 |
|
|
|
8bac60 |
dict = pbroker->dict[pos] = (enchant_dict *)emalloc(sizeof(enchant_dict));
|
|
|
8bac60 |
@@ -607,14 +606,14 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
|
|
|
8bac60 |
|
|
|
8bac60 |
d = enchant_broker_request_pwl_dict(pbroker->pbroker, (const char *)pwl);
|
|
|
8bac60 |
if (d) {
|
|
|
8bac60 |
+ pos = pbroker->dictcnt++;
|
|
|
8bac60 |
if (pbroker->dictcnt) {
|
|
|
8bac60 |
- pos = pbroker->dictcnt++;
|
|
|
8bac60 |
pbroker->dict = (enchant_dict **)erealloc(pbroker->dict, sizeof(enchant_dict *) * pbroker->dictcnt);
|
|
|
8bac60 |
} else {
|
|
|
8bac60 |
pbroker->dict = (enchant_dict **)emalloc(sizeof(enchant_dict *));
|
|
|
8bac60 |
pos = 0;
|
|
|
8bac60 |
- pbroker->dictcnt++;
|
|
|
8bac60 |
}
|
|
|
8bac60 |
+
|
|
|
8bac60 |
dict = pbroker->dict[pos] = (enchant_dict *)emalloc(sizeof(enchant_dict));
|
|
|
8bac60 |
dict->id = pos;
|
|
|
8bac60 |
dict->pbroker = pbroker;
|
|
|
8bac60 |
--
|
|
|
8bac60 |
2.1.4
|
|
|
8bac60 |
|