diff options
author | nyamatongwe <devnull@localhost> | 2006-06-15 01:32:23 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2006-06-15 01:32:23 +0000 |
commit | 0a9c9e2caad0239410af6b0d1f49e4fbbbeaee2b (patch) | |
tree | 161fe00a2d05d9844c63b8e3c63a35a15779e702 /win32/ScintillaWin.cxx | |
parent | 27fd50b878ffb760bb0e4406ed8aa9ae61aa412c (diff) | |
download | scintilla-mirror-0a9c9e2caad0239410af6b0d1f49e4fbbbeaee2b.tar.gz |
Only allow setting the code page to valid values.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index db8bd5204..f5164c5c7 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -181,6 +181,7 @@ class ScintillaWin : virtual void StartDrag(); sptr_t WndPaint(uptr_t wParam); sptr_t HandleComposition(uptr_t wParam, sptr_t lParam); + virtual bool ValidCodePage(int codePage) const; virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); virtual bool SetIdle(bool on); virtual void SetTicking(bool on); @@ -954,6 +955,12 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam return 0l; } +bool ScintillaWin::ValidCodePage(int codePage) const { + return codePage == 0 || codePage == SC_CP_UTF8 || + codePage == 932 || codePage == 936 || codePage == 949 || + codePage == 950 || codePage == 1361; +} + sptr_t ScintillaWin::DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } |