elua: properly copy flags around

This commit is contained in:
Daniel Kolesa 2014-06-03 15:55:34 +01:00
parent ef2ad4f473
commit aab605e36a
1 changed files with 6 additions and 1 deletions

View File

@ -39,9 +39,11 @@ local cmp_msgs = function(msg1, msg2)
end
local new_msg = function(msg)
local copyflags = {}
for i, v in ipairs(msg.flags) do copyflags[#copyflags + 1] = v end
return {
msg[1], msg[2], msg.context, comments = { msg.comment },
xcomment = msg.xcomment, lines = { msg.line }
xcomment = msg.xcomment, lines = { msg.line }, flags = copyflags
}
end
@ -55,6 +57,9 @@ local gen_grouped_messages = function(ps)
if cmp_msgs(msg, amsg) then
amsg.lines [#amsg.lines + 1] = msg.line
amsg.comments[#amsg.comments + 1] = msg.comment
for i, v in ipairs(msg.flags) do
amsg.flags[#amsg.flags + 1] = v
end
found = true
break
end