From: Laszlo T. <ave...@us...> - 2011-06-01 16:16:16
|
gemrb: Infinity Engine emulator The branch master has been updated via e347273d97fb84f5432ef4fcd3b1204019027e7d (commit) Summary of changes: gemrb/core/KeyMap.cpp | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) from 997e14e20293527aa055d38f49953a68f5281c7c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=e347273d97fb84f5432ef4fcd3b1204019027e7d commit e347273d97fb84f5432ef4fcd3b1204019027e7d Author: Avenger <ave...@so...> Date: Wed Jun 1 18:15:23 2011 +0200 fix bg1 keymap.ini processing (ignore trailing spaces) diff --git a/gemrb/core/KeyMap.cpp b/gemrb/core/KeyMap.cpp index aacc08b..f12d8e2 100644 --- a/gemrb/core/KeyMap.cpp +++ b/gemrb/core/KeyMap.cpp @@ -78,6 +78,13 @@ bool KeyMap::InitializeKeyMap(const char *inifile, const char *tablefile) continue; strnlwrcpy(name,name,KEYLENGTH); + //remove trailing spaces (bg1 ini file contains them) + char *nameend = name + strlen( name ) - 1; + while (nameend >= name && strchr( " \t\r\n", *nameend )) { + *nameend-- = '\0'; + } + + //change internal spaces to underscore for(int c=0;c<KEYLENGTH;c++) if (name[c]==' ') name[c]='_'; int l = strlen(value); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |