upsimage.cgi: adjust scaling for small ranges (single-digit)#3496
Conversation
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit 73fa2f4 is temporarily available: NUT-tarballs-PR-3496.zip. |
|
✅ Build nut 2.8.5.4852-master completed (commit 3471d3f670 by @jimklimov)
|
…single-digit) ranges [networkupstools#3469] Avoid lack of output when the range of a variable is small (e.g. 0-10) and division by zero occurred instead. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
✅ Build nut 2.8.5.4854-master completed (commit 6f7ae47734 by @jimklimov)
|
|
✅ Build nut 2.8.5.4854-master completed (commit 6f7ae47734 by @jimklimov) |
|
Tested on: Arch Linux, NUT 2.8.5, nutdrv_qx Q1, VulTech GS-3KVAS-RK (device reports battery.voltage as single 2 V cell) Result with stock 2.8.5: exit=136 (SIGFPE), empty output, Apache logs End of script output before headers. Patch confirmed working. ✅ |
Closes: #3469
Avoid lack of output when the range of a variable is small (e.g. 0-10) and division by zero occurred instead.
Practical testing needed (not done so far).