Kaydet (Commit) e63f6503 authored tarafından Michael Stahl's avatar Michael Stahl

hunspell: MSVC debug runtime iterators don't want to decrement past begin()

Change-Id: I258dc551d14ba72113b284be3566ba924434ab4c
üst e2e35d56
......@@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,hunspell,$(HUNSPELL_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,hunspell,\
external/hunspell/hunspell-solaris.patch \
external/hunspell/hunspell-iterator.patch.1 \
))
ifeq ($(COM),MSC)
......
MSVC debug runtime iterators don't want to be decremented past begin()
--- hunspell/src/hunspell/affixmgr.cxx.orig 2016-04-15 23:30:37.555875079 +0200
+++ hunspell/src/hunspell/affixmgr.cxx 2016-04-15 23:30:43.669875027 +0200
@@ -4638,7 +4638,7 @@
return;
int neg = 0;
- for (std::string::iterator k = piece.begin() + piece.size() - 1; k >= piece.begin(); --k) {
+ for (std::string::iterator k = piece.begin() + piece.size() - 1; ; --k) {
switch (*k) {
case '[': {
if (neg)
@@ -4666,6 +4666,8 @@
*(k + 1) = *k;
}
}
+ if (k == piece.begin())
+ break;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment