Browse Source

Don't mangle the input to split_hook_name().

Iain Patterson 7 years ago
parent
commit
9c2dbaf361
1 changed files with 2 additions and 1 deletions
  1. 2 1
      settings.cpp

+ 2 - 1
settings.cpp

@@ -197,7 +197,8 @@ static inline bool split_hook_name(const TCHAR *hook_name, TCHAR *hook_event, TC
     if (*s == _T('/')) {
       *s = _T('\0');
       _sntprintf_s(hook_event, HOOK_NAME_LENGTH, _TRUNCATE, _T("%s"), hook_name);
-      _sntprintf_s(hook_action, HOOK_NAME_LENGTH, _TRUNCATE, _T("%s"), ++s);
+      *s++ = _T('/');
+      _sntprintf_s(hook_action, HOOK_NAME_LENGTH, _TRUNCATE, _T("%s"), s);
       return valid_hook_name(hook_event, hook_action, false);
     }
   }