|
From: <bul...@us...> - 2013-05-30 18:27:45
|
Revision: 22786
http://sourceforge.net/p/bzflag/code/22786
Author: bullet_catcher
Date: 2013-05-30 18:27:42 +0000 (Thu, 30 May 2013)
Log Message:
-----------
Use a copy of an XKeyEvent structure to preserve its const quality.
Modified Paths:
--------------
trunk/bzflag/src/platform/XDisplay.cxx
Modified: trunk/bzflag/src/platform/XDisplay.cxx
===================================================================
--- trunk/bzflag/src/platform/XDisplay.cxx 2013-05-30 18:14:07 UTC (rev 22785)
+++ trunk/bzflag/src/platform/XDisplay.cxx 2013-05-30 18:27:42 UTC (rev 22786)
@@ -234,7 +234,8 @@
{
char buf[3];
KeySym keysym;
- if (XLookupString((XKeyEvent*)&xevent.xkey, buf, 1, &keysym, NULL) == 1) {
+ XKeyEvent xkey = xevent.xkey; // non-const copy
+ if (XLookupString(&xkey, buf, 1, &keysym, NULL) == 1) {
key.ascii = buf[0];
key.button = BzfKeyEvent::NoButton;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|