Fix buffer overrun in Linux/x86_64 (Pixel is a 64 bit long, passing
a 32 bit int pointer to XtVaGetValues will cause trouble). Using a long should suffice. A configure test would be better. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,8 +41,8 @@ public:
|
||||
unsigned char Green() const { return m_green; }
|
||||
unsigned char Blue() const { return m_blue; }
|
||||
|
||||
int GetPixel() const { return m_pixel; };
|
||||
void SetPixel(int pixel) { m_pixel = pixel; m_isInit = true; };
|
||||
WXPixel GetPixel() const { return m_pixel; };
|
||||
void SetPixel(WXPixel pixel) { m_pixel = pixel; m_isInit = true; };
|
||||
|
||||
inline bool operator == (const wxColour& colour) const { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); }
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
// TODO: can this handle mono displays? If not, we should have an extra
|
||||
// flag to specify whether this should be black or white by default.
|
||||
|
||||
int AllocColour(WXDisplay* display, bool realloc = false);
|
||||
WXPixel AllocColour(WXDisplay* display, bool realloc = false);
|
||||
|
||||
protected:
|
||||
// Helper function
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
unsigned char m_green;
|
||||
|
||||
public:
|
||||
int m_pixel;
|
||||
WXPixel m_pixel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user