[Scummvm-git-logs] scummvm master -> 7263bbb48e06292bda8c080ef4c09384e6b6c71f
digitall
noreply at scummvm.org
Sun Dec 3 19:52:06 UTC 2023
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:
7263bbb48e GLK: AGT: Fix Usage of Temporary Variable Address as Persistent Pointer
Commit: 7263bbb48e06292bda8c080ef4c09384e6b6c71f
https://github.com/scummvm/scummvm/commit/7263bbb48e06292bda8c080ef4c09384e6b6c71f
Author: D G Turner (digitall at scummvm.org)
Date: 2023-12-03T19:50:07Z
Commit Message:
GLK: AGT: Fix Usage of Temporary Variable Address as Persistent Pointer
This generated a Compiler Warning from GCC-13 when -Wdangling-pointer was
passed.
Changed paths:
engines/glk/agt/exec.cpp
diff --git a/engines/glk/agt/exec.cpp b/engines/glk/agt/exec.cpp
index baa521d1d47..2bd86dd0439 100644
--- a/engines/glk/agt/exec.cpp
+++ b/engines/glk/agt/exec.cpp
@@ -1193,9 +1193,9 @@ void increment_turn(void) {
creatloop(i)
if (creature[i].location == loc + first_room && creature[i].hostile &&
creature[i].timethresh > 0) {
- parse_rec tmpcreat; /* Used for creature messages */
- make_parserec(i + first_creat, &tmpcreat);
- curr_creat_rec = &tmpcreat;
+ parse_rec *tmpcreat = nullptr; /* Used for creature messages */
+ make_parserec(i + first_creat, tmpcreat);
+ curr_creat_rec = tmpcreat;
if (++creature[i].timecounter >= creature[i].timethresh) {
/* Creature attacks */
More information about the Scummvm-git-logs
mailing list