aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-12-09 22:53:51 +0000
committernyamatongwe <devnull@localhost>2005-12-09 22:53:51 +0000
commit84fa7a5a87c476c6eec085cae5d4ea10c1454507 (patch)
tree0dbe6de2c12614ff154a56cd9c3c32140ec7248d /src
parent2a05c05e309b30d2163edc82de8df96ecdb64ac7 (diff)
downloadscintilla-mirror-84fa7a5a87c476c6eec085cae5d4ea10c1454507.tar.gz
Casts result of SafeGetCharAt so that it is treated as unsigned.
Diffstat (limited to 'src')
-rw-r--r--src/StyleContext.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/StyleContext.h b/src/StyleContext.h
index d34c89422..36b50f914 100644
--- a/src/StyleContext.h
+++ b/src/StyleContext.h
@@ -104,7 +104,7 @@ public:
return currentPos - styler.GetStartSegment();
}
int GetRelative(int n) {
- return styler.SafeGetCharAt(currentPos+n);
+ return static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n));
}
bool Match(char ch0) {
return ch == ch0;
@@ -134,7 +134,8 @@ public:
return false;
s++;
for (int n=2; *s; n++) {
- if (*s != tolower((styler.SafeGetCharAt(currentPos+n))))
+ if (*s !=
+ tolower(static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n))))
return false;
s++;
}