diff options
author | nyamatongwe <unknown> | 2009-04-01 00:47:35 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-04-01 00:47:35 +0000 |
commit | 4963aae22bedfb1f04703cb0880156f4d0366e74 (patch) | |
tree | 818fbeb659e1bc1bfd5df6acad57bd1b63cf2abb /src | |
parent | d60da95cd3e9d2427d1f2ef0850a3a9e485e96a1 (diff) | |
download | scintilla-mirror-4963aae22bedfb1f04703cb0880156f4d0366e74.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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ViewStyle.cxx | 2 |
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); } |