diff --git a/src/EnumHelper.h b/src/EnumHelper.h index dc1049cc0c..d3bf4267f3 100644 --- a/src/EnumHelper.h +++ b/src/EnumHelper.h @@ -135,6 +135,11 @@ static void Lua##X(lua_State* L) \ lua_pushstring( L, (#X "_")+s ); \ lua_pushnumber( L, i ); /* 0-based */ \ lua_rawset( L, -3 ); \ + /* Compatibility with old, case-insensitive values */ \ + s.MakeLower(); \ + lua_pushstring( L, s ); \ + lua_pushnumber( L, i ); /* 0-based */ \ + lua_rawset( L, -3 ); \ } \ EnumTraits::StringToEnum.SetFromStack( L ); \ EnumTraits::StringToEnum.PushSelf( L ); \