[PATCH v2 3/8] lua/pickle: fix a typo
Serge Petrenko
sergepetrenko at tarantool.org
Wed Aug 14 14:15:57 MSK 2019
> 14 авг. 2019 г., в 14:12, Vladimir Davydov <vdavydov.dev at gmail.com> написал(а):
>
> On Thu, Aug 08, 2019 at 02:55:54PM +0300, Serge Petrenko wrote:
>> ---
>> src/lua/pickle.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/lua/pickle.c b/src/lua/pickle.c
>> index e47ac11b4..65208b5b3 100644
>> --- a/src/lua/pickle.c
>> +++ b/src/lua/pickle.c
>> @@ -109,14 +109,14 @@ lbox_pack(struct lua_State *L)
>> case 'I':
>> case 'i':
>> /* signed and unsigned 32-bit integers */
>> - if (field.type != MP_UINT && field.ival != MP_INT)
>> + if (field.type != MP_UINT && field.type != MP_INT)
>> luaL_error(L, "pickle.pack: expected 32-bit int");
>>
>> luaL_region_dup(L, buf, &field.ival, sizeof(uint32_t));
>> break;
>> case 'N':
>> /* signed and unsigned 32-bit big endian integers */
>> - if (field.type != MP_UINT && field.ival != MP_INT)
>> + if (field.type != MP_UINT && field.type != MP_INT)
>> luaL_error(L, "pickle.pack: expected 32-bit int");
>>
>> field.ival = htonl(field.ival);
>
> I assume this is a bug and so this patch should be pushed to all
> maintained branches, right?
Yep
>
> Could you please add a test for this issue?
No problem
--
Serge Petrenko
sergepetrenko at tarantool.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190814/caab3918/attachment.html>
More information about the Tarantool-patches
mailing list