Skip to content

Commit

Permalink
Fixed construct_unsigned32 and construct_signed32 macros
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Jun 25, 2024
1 parent 0f2e3de commit ebae33c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vscp/common/vscp-bootdevice-vscp.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@

// This macro construct a signed long from four unsigned chars in a safe way
#define construct_signed32(b0, b1, b2, b3) \
((int32_t) ((((uint32_t) b0) << 24) + (((uint32_t) b0) << 16) + (((uint32_t) b0) << 8) + (uint32_t) b0))
((int32_t) ((((uint32_t) b0) << 24) + (((uint32_t) b1) << 16) + (((uint32_t) b2) << 8) + (uint32_t) b3))

// This macro construct a unsigned long from four unsigned chars in a safe way
#define construct_unsigned32(b0, b1, b2, b3) \
((uint32_t) ((((uint32_t) b0) << 24) + (((uint32_t) b0) << 16) + (((uint32_t) b0) << 8) + (uint32_t) b0))
((uint32_t) ((((uint32_t) b0) << 24) + (((uint32_t) b1) << 16) + (((uint32_t) b1) << 8) + (uint32_t) b3))

class CBootDevice_VSCP : public CBootDevice {
public:
Expand Down

0 comments on commit ebae33c

Please sign in to comment.