diff --git a/libaegisub/common/path.cpp b/libaegisub/common/path.cpp index c76b4b2975..00af561d4c 100644 --- a/libaegisub/common/path.cpp +++ b/libaegisub/common/path.cpp @@ -37,16 +37,16 @@ static const char *tokens[] = { int find_token(const char *str, size_t len) { if (len < 5 || str[0] != '?') return -1; int idx; - switch (str[1] + str[4]) { - case 'a' + 'i': idx = 0; break; - case 'd' + 'a': idx = 1; break; - case 'd' + 't': idx = 2; break; - case 'l' + 'a': idx = 3; break; - case 's' + 'i': idx = 4; break; - case 's' + 't': idx = 5; break; - case 't' + 'p': idx = 6; break; - case 'u' + 'r': idx = 7; break; - case 'v' + 'e': idx = 8; break; + switch (str[2] + str[4]) { + case 'u' + 'i': idx = 0; break; + case 'a' + 'a': idx = 1; break; + case 'i' + 't': idx = 2; break; + case 'o' + 'a': idx = 3; break; + case 'c' + 'i': idx = 4; break; + case 't' + 't': idx = 5; break; + case 'e' + 'p': idx = 6; break; + case 's' + 'r': idx = 7; break; + case 'i' + 'e': idx = 8; break; default: return -1; } diff --git a/libaegisub/include/libaegisub/path.h b/libaegisub/include/libaegisub/path.h index a1bcb7afcf..88cac205a9 100644 --- a/libaegisub/include/libaegisub/path.h +++ b/libaegisub/include/libaegisub/path.h @@ -23,7 +23,7 @@ namespace agi { /// Class for handling everything path-related in Aegisub class Path { /// Token -> Path map - std::array paths; + std::array paths; /// Platform-specific code to fill in the default paths, called in the constructor void FillPlatformSpecificPaths();