From 24e5a90bab98b7076b4e91b77440979027ec235e Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 3 Sep 2014 02:15:58 +0200 Subject: [PATCH] Fix crash when input settings contain extra channels --- extern/oics/ICSInputControlSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/oics/ICSInputControlSystem.cpp b/extern/oics/ICSInputControlSystem.cpp index 34d16ed2b..27006e987 100644 --- a/extern/oics/ICSInputControlSystem.cpp +++ b/extern/oics/ICSInputControlSystem.cpp @@ -84,7 +84,7 @@ namespace ICS TiXmlElement* xmlChannel = xmlControl->FirstChildElement("Channel"); while(xmlChannel) { - controlChannelCount = std::max(channelCount, FromString(xmlChannel->Attribute("number"))); + controlChannelCount = std::max(channelCount, FromString(xmlChannel->Attribute("number"))+1); xmlChannel = xmlChannel->NextSiblingElement("Channel"); }