Skip to content

Commit 622ff0e

Browse files
committed
fix reading PacketsCaptured in PacketTotalStatistics from wrong offset
1 parent 65e785e commit 622ff0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PcapDotNet/src/PcapDotNet.Core/PacketTotalStatistics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal PacketTotalStatistics(IntPtr /* const pcap_stat& */ statisticsPtr, int
3030
_packetsDroppedByDriver = (uint)Marshal.ReadInt32(statisticsPtr, 1 * elementSize);
3131
_packetsDroppedByInterface = (uint)Marshal.ReadInt32(statisticsPtr, 2 * elementSize);
3232
_packetsCaptured = statisticsSize >= 16
33-
? (uint)Marshal.ReadInt32(statisticsPtr, 4 * elementSize)
33+
? (uint)Marshal.ReadInt32(statisticsPtr, 3 * elementSize)
3434
: 0;
3535
}
3636

0 commit comments

Comments
 (0)