diff --git a/src/textord/cjkpitch.cpp b/src/textord/cjkpitch.cpp index d4c9fd1b..3726f285 100644 --- a/src/textord/cjkpitch.cpp +++ b/src/textord/cjkpitch.cpp @@ -162,7 +162,7 @@ public: vote += values_[i].vote; } - return rc / vote; + return vote == 0 ? 0.0f : rc / vote; } private: