[Scummvm-git-logs] scummvm master -> 0e717217d3a4e14ac91b631c48bce42636cdb2cd

dwatteau noreply at scummvm.org
Wed Oct 22 18:05:18 UTC 2025


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

Summary:
0e717217d3 LURE: Fix debugC() being given a nullptr


Commit: 0e717217d3a4e14ac91b631c48bce42636cdb2cd
    https://github.com/scummvm/scummvm/commit/0e717217d3a4e14ac91b631c48bce42636cdb2cd
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-22T19:58:58+02:00

Commit Message:
LURE: Fix debugC() being given a nullptr

Giving a nullptr (as a string argument) to printf-like functions is
forbidden (although Windows, Linux and macOS tend to allow it).

Use "(null)" as a fallback string, instead.

Reported by -Wformat-overflow in GCC 15.2.

Changed paths:
    engines/lure/hotspots.cpp


diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index e9db3f13f42..bb7ba2ed9b5 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -1258,7 +1258,7 @@ void Hotspot::doAction(Action action, HotspotData *hotspot) {
 	StringList &stringList = Resources::getReference().stringList();
 	int charId = _hotspotId;
 	debugC(ERROR_INTERMEDIATE, kLureDebugHotspots,  "Action charId=%xh Action=%d/%s",
-		charId, (int)action, (action > EXAMINE) ? nullptr : stringList.getString((int)action));
+		charId, (int)action, (action > EXAMINE) ? "(null)" : stringList.getString((int)action));
 
 	// Set the ACTIVE_HOTSPOT_ID and USE_HOTSPOT_ID fields
 	if (hotspot != nullptr) {




More information about the Scummvm-git-logs mailing list