aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-09-02 21:22:04 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-09-02 21:22:04 +0200
commitbaa36e7fcb271838f2696232b513bf54df4b6d0a (patch)
tree9e8ae40f07dbb95ea3904a667d3db163365aff30 /dw
parent444d2258d9e05d81be005a16f079b7313c7094b7 (diff)
fix text search when text contains special char equal to -2
The values of START and END in CharIterator must not clash with any possible char value. As it is undefined whether char is signed or not we need to use values that do not clash in either case.
Diffstat (limited to 'dw')
-rw-r--r--dw/iterator.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/dw/iterator.hh b/dw/iterator.hh
index f8fb4d31..89b9faac 100644
--- a/dw/iterator.hh
+++ b/dw/iterator.hh
@@ -219,7 +219,9 @@ public:
class CharIterator: public object::Object, public misc::Comparable
{
public:
- enum { START = -1, END = -2 };
+ // START and END must not clash with any char value
+ // neither for signed nor unsigned char.
+ enum { START = 257, END = 258 };
private:
DeepIterator *it;