diff options
author | nyamatongwe <devnull@localhost> | 2005-12-09 22:53:51 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2005-12-09 22:53:51 +0000 |
commit | 84fa7a5a87c476c6eec085cae5d4ea10c1454507 (patch) | |
tree | 0dbe6de2c12614ff154a56cd9c3c32140ec7248d | |
parent | 2a05c05e309b30d2163edc82de8df96ecdb64ac7 (diff) | |
download | scintilla-mirror-84fa7a5a87c476c6eec085cae5d4ea10c1454507.tar.gz |
Casts result of SafeGetCharAt so that it is treated as unsigned.
-rw-r--r-- | src/StyleContext.h | 5 |
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++; } |