From b898032c5786ea573f5ed2249a604685670633b2 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 15 Nov 2010 22:08:51 +0000 Subject: [PATCH] Fixed crash when reading in old-style input files. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6581 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/input/binding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/binding.cpp b/src/input/binding.cpp index 333cad58b..3dfe5f674 100644 --- a/src/input/binding.cpp +++ b/src/input/binding.cpp @@ -55,7 +55,7 @@ bool Binding::deserialize(irr::io::IrrXMLReader* xml) // Convert strings to string tags to integer types m_type = (Input::InputType)atoi(event_string); m_id = atoi(id_string); - m_character = atoi(character); + m_character = character ? atoi(character) : 0; // If the action is not a stick motion (button or key) if (m_type == Input::IT_STICKMOTION)