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

Fix more build issues on appveyor

This commit is contained in:
Matias Fontanini
2017-05-08 21:51:27 -07:00
parent bd0db1354e
commit b0d66a01d2
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;
}