[Scummvm-cvs-logs] SF.net SVN: scummvm: [29062] residual/trunk/engine.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Sep 23 23:58:12 CEST 2007


Revision: 29062
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29062&view=rev
Author:   eriktorbjorn
Date:     2007-09-23 14:58:12 -0700 (Sun, 23 Sep 2007)

Log Message:
-----------
Parentheses around the CHAR_KEY() macro. Otherwise, "userPaintHandler !=
LUA_NOOBJECT && CHAR_KEY(ascii)" can be true, even when userPaintHandler *is*
LUA_NOOBJECT. Specifically, residual would crash if you pressed space...

Modified Paths:
--------------
    residual/trunk/engine.cpp

Modified: residual/trunk/engine.cpp
===================================================================
--- residual/trunk/engine.cpp	2007-09-23 20:23:49 UTC (rev 29061)
+++ residual/trunk/engine.cpp	2007-09-23 21:58:12 UTC (rev 29062)
@@ -38,7 +38,7 @@
 
 // CHAR_KEY tests to see whether a keycode is for
 // a "character" handler or a "button" handler
-#define CHAR_KEY(k) (k >= 'a' && k <= 'z') || (k >= 'A' && k <= 'Z') || (k >= '0' && k <= '9') || k == ' '
+#define CHAR_KEY(k) ((k >= 'a' && k <= 'z') || (k >= 'A' && k <= 'Z') || (k >= '0' && k <= '9') || k == ' ')
 
 Engine *g_engine = NULL;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list