mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-16 01:05:15 +08:00
netdev_cmd_ping() computed avg_time / received before checking that any reply arrived. When every request times out, received is 0 and the integer division traps (SIGFPE on the simulator, a fault on Cortex-M), taking the shell thread down. Only compute the average inside the existing received > 0 branch where it is printed. Fixes #11852