[Scummvm-git-logs] scummvm master -> db8559ff3e73b5257c1be83a5a1cd4209d118901

lephilousophe lephilousophe at users.noreply.github.com
Sat Mar 20 20:04:22 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
db8559ff3e COMMON: Initialize _pbase_dir in all constructors


Commit: db8559ff3e73b5257c1be83a5a1cd4209d118901
    https://github.com/scummvm/scummvm/commit/db8559ff3e73b5257c1be83a5a1cd4209d118901
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-03-20T21:04:06+01:00

Commit Message:
COMMON: Initialize _pbase_dir in all constructors

Fixes bug #12337

Changed paths:
    common/unicode-bidi.cpp


diff --git a/common/unicode-bidi.cpp b/common/unicode-bidi.cpp
index c09fa46595..87f68778a0 100644
--- a/common/unicode-bidi.cpp
+++ b/common/unicode-bidi.cpp
@@ -35,15 +35,20 @@
 
 namespace Common {
 
-UnicodeBiDiText::UnicodeBiDiText(const Common::U32String &str) : logical(str), _log_to_vis_index(NULL), _vis_to_log_index(NULL) {
+UnicodeBiDiText::UnicodeBiDiText(const Common::U32String &str) :
+	logical(str), _pbase_dir(FRIBIDI_PAR_ON),
+	_log_to_vis_index(NULL), _vis_to_log_index(NULL) {
 	initWithU32String(str);
 }
 
-UnicodeBiDiText::UnicodeBiDiText(const Common::String &str, const Common::CodePage page) : logical(str), _log_to_vis_index(NULL), _vis_to_log_index(NULL) {
+UnicodeBiDiText::UnicodeBiDiText(const Common::String &str, const Common::CodePage page) :
+	logical(str), _pbase_dir(FRIBIDI_PAR_ON),
+	_log_to_vis_index(NULL), _vis_to_log_index(NULL) {
 	initWithU32String(str.decode(page));
 }
 
-UnicodeBiDiText::UnicodeBiDiText(const Common::String &str, const Common::CodePage page, uint32 *pbase_dir) : logical(str), _log_to_vis_index(NULL), _vis_to_log_index(NULL) {
+UnicodeBiDiText::UnicodeBiDiText(const Common::String &str, const Common::CodePage page,
+		uint32 *pbase_dir) : logical(str), _log_to_vis_index(NULL), _vis_to_log_index(NULL) {
 	_pbase_dir = *pbase_dir;
 	initWithU32String(str.decode(page));
 	*pbase_dir = _pbase_dir;
@@ -54,7 +59,7 @@ UnicodeBiDiText::~UnicodeBiDiText() {
 	delete[] _vis_to_log_index;
 }
 
-uint32 UnicodeBiDiText::getVisualPosition(uint32 logicalPos) const { 
+uint32 UnicodeBiDiText::getVisualPosition(uint32 logicalPos) const {
 	if (NULL != _log_to_vis_index && logicalPos < size()) {
 		return _log_to_vis_index[logicalPos];
 	}




More information about the Scummvm-git-logs mailing list