From 0a9c9e2caad0239410af6b0d1f49e4fbbbeaee2b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 15 Jun 2006 01:32:23 +0000 Subject: Only allow setting the code page to valid values. --- src/Editor.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 6fd4c44af..87a0391b4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6509,8 +6509,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return pdoc->LineEnd(wParam); case SCI_SETCODEPAGE: - pdoc->dbcsCodePage = wParam; - InvalidateStyleRedraw(); + if (ValidCodePage(wParam)) { + pdoc->dbcsCodePage = wParam; + InvalidateStyleRedraw(); + } break; case SCI_GETCODEPAGE: -- cgit v1.2.3