From e56351703127c790ee47a2d0841d85fddcbccc39 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Fri, 23 Mar 2012 10:23:48 -0400 Subject: [PATCH] Fixed VC2010 "attempt to index local 'cfg'" error --- src/actions/vstudio/vs2010_vcxproj.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 54171695..953ced32 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -449,8 +449,9 @@ -- I need a project configuration in order to fetch a file's configuration, -- which would contain any custom build rules. I'm hoping that I can get -- away with only looking at the first config, and not iterating them all - local cfg = project.getconfig(prj, prj.solution.configurations[1]) - + local iter = project.eachconfig(prj) + local cfg = iter() + for file in project.eachfile(prj) do local filecfg = config.getfileconfig(cfg, file.abspath) if filecfg and filecfg.buildrule then