aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRust.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexRust.cxx')
-rw-r--r--lexers/LexRust.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexers/LexRust.cxx b/lexers/LexRust.cxx
index ff5e816ba..5e8a4d167 100644
--- a/lexers/LexRust.cxx
+++ b/lexers/LexRust.cxx
@@ -214,7 +214,7 @@ static void ScanIdentifier(Accessor& styler, Sci_Position& pos, WordList *keywor
styler.ColourTo(pos - 1, SCE_RUST_MACRO);
} else {
char s[MAX_RUST_IDENT_CHARS + 1];
- int len = pos - start;
+ Sci_Position len = pos - start;
len = len > MAX_RUST_IDENT_CHARS ? MAX_RUST_IDENT_CHARS : len;
GrabString(s, styler, start, len);
bool keyword = false;