[Scummvm-git-logs] scummvm master -> 4991699bda318e93a5d8004b3e938cec87b1db37

Strangerke noreply at scummvm.org
Thu May 23 22:18:09 UTC 2024


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

Summary:
2f8d8567d3 BAGEL: Initialize two variables in CBofTextBox
4991699bda BAGEL: Use fatalError when bofMemAlloc doesn't manage to allocate memory ALLOC_FAIL_RETRIES times in a row


Commit: 2f8d8567d30e779a0a9ac175c476736db1125c5a
    https://github.com/scummvm/scummvm/commit/2f8d8567d30e779a0a9ac175c476736db1125c5a
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-23T23:17:31+01:00

Commit Message:
BAGEL: Initialize two variables in CBofTextBox

Changed paths:
    engines/bagel/boflib/gui/text_box.cpp


diff --git a/engines/bagel/boflib/gui/text_box.cpp b/engines/bagel/boflib/gui/text_box.cpp
index c7724383e87..1d2b94ad551 100644
--- a/engines/bagel/boflib/gui/text_box.cpp
+++ b/engines/bagel/boflib/gui/text_box.cpp
@@ -60,6 +60,7 @@ CBofTextBox::CBofTextBox(CBofWindow *pWindow, const CBofRect *pRect, const CBofS
 	_nCurrentLine = 0;
 	_nCurrentIndex = 0;
 	_nNumLines = 0;
+	_nTextFont = FONT_DEFAULT;
 
 	setText(cText);
 	setBox(pRect);
@@ -82,6 +83,7 @@ CBofTextBox::CBofTextBox(CBofBitmap *pBitmap, const CBofRect *pRect, const CBofS
 	_nCurrentLine = 0;
 	_nCurrentIndex = 0;
 	_nNumLines = 0;
+	_nTextFont = FONT_DEFAULT;
 
 	setText(cText);
 	setBox(pRect);


Commit: 4991699bda318e93a5d8004b3e938cec87b1db37
    https://github.com/scummvm/scummvm/commit/4991699bda318e93a5d8004b3e938cec87b1db37
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-23T23:17:31+01:00

Commit Message:
BAGEL: Use fatalError when bofMemAlloc doesn't manage to allocate memory ALLOC_FAIL_RETRIES times in a row

Changed paths:
    engines/bagel/boflib/misc.cpp


diff --git a/engines/bagel/boflib/misc.cpp b/engines/bagel/boflib/misc.cpp
index 243cce4866b..9e71e22b613 100644
--- a/engines/bagel/boflib/misc.cpp
+++ b/engines/bagel/boflib/misc.cpp
@@ -21,7 +21,6 @@
 
 #include "common/file.h"
 #include "bagel/boflib/misc.h"
-#include "bagel/boflib/log.h"
 #include "bagel/boflib/cache.h"
 #include "bagel/bagel.h"
 #include "bagel/boflib/string_functions.h"
@@ -76,9 +75,8 @@ void *bofMemAlloc(uint32 nSize, const char *pFile, int nLine, bool bClear) {
 		CCache::optimize(nSize + 2 * sizeof(uint16) + sizeof(uint32));
 	}
 
-	if (pNewBlock == nullptr) {
-		logError(buildString("Could not allocate %u bytes, file %s, line %d", nSize, pFile, nLine));
-	}
+	if (pNewBlock == nullptr)
+		CBofError::fatalError(ERR_MEMORY, "Could not allocate %u bytes, file %s, line %d", nSize, pFile, nLine);
 
 	return pNewBlock;
 }




More information about the Scummvm-git-logs mailing list