starwing / lua-protobuf

A Lua module to work with Google protobuf
MIT License
1.75k stars 387 forks source link

使用pb.fields遍历枚举时,会漏掉值位0的枚举 #46

Closed Jayatubi closed 6 years ago

Jayatubi commented 6 years ago
enum EquipPos
{
    EquipPos_Head = 0;
    EquipPos_Armor = 1;
    EquipPos_Shoe = 2;
    EquipPos_Cloak = 3;
}
for k, v, _ in pb.fields("EquipPos") do
    print(k)
    print(v)
end

输出:

EquipPos_Armor
1
EquipPos_Shoe
2
EquipPos_Cloak
3
starwing commented 6 years ago

已经修复