diff options
author | nyamatongwe <devnull@localhost> | 2006-10-29 23:19:47 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2006-10-29 23:19:47 +0000 |
commit | cc34d8a3ecbd477e43b6b0caac570e641195eb50 (patch) | |
tree | e15e5841d9a1ee935439ff46bd9a3570aa77c7dc | |
parent | 1c28caf172322ff752de91c1f2079a6ebaa533e8 (diff) | |
download | scintilla-mirror-cc34d8a3ecbd477e43b6b0caac570e641195eb50.tar.gz |
Fix infinite loop when GetColumn called with position beyond end of text.
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index fee76840d..e530b0423 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -684,6 +684,8 @@ int Document::GetColumn(int pos) { return column; } else if (ch == '\n') { return column; + } else if (i >= Length()) { + return column; } else { column++; i = MovePositionOutsideChar(i + 1, 1); |