Re-fix '0' crashing the editor

This commit is contained in:
Glenn Maynard
2003-10-10 22:22:10 +00:00
parent af254e4f91
commit 8c5c84b691
+4 -1
View File
@@ -613,7 +613,10 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
if( type != IET_FIRST_PRESS )
break; // We only care about first presses
int iCol = DeviceI.button - SDLK_1;
/* Why was this changed back to just "DeviceI.button - SDLK_1"? That causes
* crashes when 0 is pressed (0 - 1 = -1). -glenn */
// int iCol = DeviceI.button - SDLK_1;
int iCol = DeviceI.button == SDLK_0? 9: DeviceI.button - SDLK_1;
// Alt + number = input to right half