aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-04-01 00:47:35 +0000
committernyamatongwe <devnull@localhost>2009-04-01 00:47:35 +0000
commit9a08b3b46e7eaed4bcb116d8c1f21cbcae6cca26 (patch)
tree818fbeb659e1bc1bfd5df6acad57bd1b63cf2abb
parent9c4ba20d539058a2480afab3ce3aad52ae88db78 (diff)
downloadscintilla-mirror-9a08b3b46e7eaed4bcb116d8c1f21cbcae6cca26.tar.gz
Fixed crash when setting a style that was for an index that was exactly a
power of 2 and was beyond the end of the styles array.
-rw-r--r--src/ViewStyle.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 15efea8cc..811f79a6d 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -322,7 +322,7 @@ void ViewStyle::AllocStyles(size_t sizeNew) {
void ViewStyle::EnsureStyle(size_t index) {
if (index >= stylesSize) {
size_t sizeNew = stylesSize * 2;
- while (sizeNew < index)
+ while (sizeNew <= index)
sizeNew *= 2;
AllocStyles(sizeNew);
}