1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 12:01:34 +01:00

Fix more build issues on appveyor

This commit is contained in:
Matias Fontanini
2017-05-08 21:51:27 -07:00
parent de2f29b797
commit 6896cc6346
5 changed files with 12 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ uint32_t EthernetII::trailer_size() const {
int32_t padding = 60 - sizeof(header_); // EthernetII min size is 60, padding is sometimes needed
if (inner_pdu()) {
padding -= inner_pdu()->size();
padding = std::max(0, padding);
padding = padding > 0 ? padding : 0;
}
return padding;
}