From 11b4f4177b243c0c56e03afd8ac6fdc7a9c69de1 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Sun, 8 Sep 2013 11:49:37 -0400 Subject: [PATCH] Force command line option keys to lowercase to allow mixed case from users --- src/host/premake.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/host/premake.c b/src/host/premake.c index 03ca7222..baeaf59c 100755 --- a/src/host/premake.c +++ b/src/host/premake.c @@ -6,6 +6,7 @@ #include #include +#include #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);