[Commits] [wesnoth/wesnoth] 07b047: Quell divide-by-zero warning

GitHub noreply at github.com
Wed Nov 1 00:53:41 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 07b04775ff3995fca279b15750860f5e79ae2f63
      https://github.com/wesnoth/wesnoth/commit/07b04775ff3995fca279b15750860f5e79ae2f63
  Author: Gregory A Lundberg <gregory_lundberg at gmx.com>
  Date:   2017-10-31 (Tue, 31 Oct 2017)

  Changed paths:
    M src/sdl/utils.cpp

  Log Message:
  -----------
  Quell divide-by-zero warning

Coverity has been noting that `avg` might be zero when dividing. This is impossible.

Use assert() to quell the Coverity warning.

Closes CID 13801515





More information about the Commits mailing list