starwing / lua-protobuf

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

android with luajit(lua5.1)can not encode negative number #75

Closed yiyucyp closed 6 years ago

yiyucyp commented 6 years ago

on android cell phone, the code can not get the right value, when the number is -1,

uint64_t v = (uint64_t)lua_tonumberx(L, idx, isint);

but the code can get the right value uint64_t v = (uint64_t)(int64_t)lua_tonumberx(L, idx, isint);

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 115


Totals Coverage Status
Change from base Build 114: 0.0%
Covered Lines: 1657
Relevant Lines: 1658

💛 - Coveralls
starwing commented 6 years ago

fixed by head :-)