Skip to content

Commit

Permalink
Allow zero-sized packets
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardoGomesNegri committed Dec 5, 2024
1 parent 0863649 commit 0dc9f33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libretro/net/mp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Packet Packet::parsePk(const void *buf, uint64_t len) {
// Necessary because arithmetic on void* is forbidden
const char *indexableBuf = (const char *)buf;
const char *data = indexableBuf + HeaderSize;
retro_assert(len > HeaderSize);
retro_assert(len >= HeaderSize);
size_t dataLen = len - HeaderSize;
uint64_t timestamp = swapToNetwork(*(const uint64_t*)(indexableBuf));
uint8_t aid = *(const uint8_t*)(indexableBuf + 8);
Expand Down

0 comments on commit 0dc9f33

Please sign in to comment.