From 86eb4dfcdc57e3baaa5736e0e000c012a3685315 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 30 Jun 2018 16:43:48 +0200 Subject: [PATCH] Fix CID 1164646 (Uninitialized pointer field) Signed-off-by: Stefan Weil --- src/api/baseapi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/baseapi.cpp b/src/api/baseapi.cpp index f995271cb6..e84ebd621c 100644 --- a/src/api/baseapi.cpp +++ b/src/api/baseapi.cpp @@ -2617,7 +2617,11 @@ struct TESS_CHAR : ELIST_LINK { strncpy(unicode_repr, repr, length); } - TESS_CHAR() { // Satisfies ELISTIZE. + TESS_CHAR() + : unicode_repr(nullptr), + length(0), + cost(0.0f) + { // Satisfies ELISTIZE. } ~TESS_CHAR() { delete [] unicode_repr;