XRPL-Labs / xrpld-hooks

ISC License
94 stars 28 forks source link

INT64_FROM_BUF in macro.h uses invalid literal #44

Closed vbar closed 2 years ago

vbar commented 2 years ago

Issue Description

7FU in

#define INT64_FROM_BUF(buf)\
   ((((uint64_t)((buf)[0]&7FU) << 56) +\

Steps to Reproduce

making the macro unusable:

int64_t state_value = INT64_FROM_BUF(seq_buffer);

Expected Result

does not compile

Actual Result

but produces an error:

Invalid digit 'F' in decimal constant clang(invalid_digit)

The constant should be spelled 0x7FU.

RichardAH commented 2 years ago

https://github.com/XRPL-Labs/xrpld-hooks/commit/d3f6c4ef2d23d4eac9b32d188fa6ea8767b9a66c