Force command line option keys to lowercase to allow mixed case from users
This commit is contained in:
parent
2924671dd1
commit
11b4f4177b
@ -6,6 +6,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "premake.h"
|
||||
|
||||
#if PLATFORM_MACOSX
|
||||
@ -277,6 +278,9 @@ int process_option(lua_State* L, const char* arg)
|
||||
value = "";
|
||||
}
|
||||
|
||||
/* Make keys lowercase to avoid case issues */
|
||||
for (char* p = key; *p; ++p) { *p = tolower(*p); }
|
||||
|
||||
/* Store it in the Options table, which is already on the stack */
|
||||
lua_pushstring(L, value);
|
||||
lua_setfield(L, -3, key);
|
||||
|
Reference in New Issue
Block a user