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