Skip to content

Commit

Permalink
[ipframe] fix windows build (#1623)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Wielders <[email protected]>
  • Loading branch information
MFransen69 and pwielders authored Jun 1, 2024
1 parent 0beeb12 commit 460011c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Source/core/IPFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,7 @@ namespace Core {
public:
bool IsValid() const {
const ip* ipHeader = reinterpret_cast<const ip*>(Base::Frame());
#ifdef __WINDOWS__
return ((ipHeader->protocol == PROTOCOL) && (Checksum() == ipHeader->check));
#else
return ((ipHeader->ip_p == PROTOCOL) && (Checksum() == ipHeader->ip_sum));
#endif
}
uint16_t Load(const uint8_t buffer[], const uint16_t size) {
uint16_t copySize = std::min(size, static_cast<uint16_t>(SIZE + HeaderSize));
Expand Down

0 comments on commit 460011c

Please sign in to comment.