diff --git a/src/openalpr/ocr.cpp b/src/openalpr/ocr.cpp index b7d5976..3ed962d 100644 --- a/src/openalpr/ocr.cpp +++ b/src/openalpr/ocr.cpp @@ -31,7 +31,7 @@ OCR::OCR(Config* config) tesseract=new TessBaseAPI(); // Tesseract requires the prefix directory to be set as an env variable - vector tessdataPrefix(config->getTessdataPrefix().size()); + vector tessdataPrefix(config->getTessdataPrefix().size() + 1); strcpy(tessdataPrefix.data(), config->getTessdataPrefix().c_str()); putenv(tessdataPrefix.data());