[Scummvm-git-logs] scummvm master -> 348661c08d1346d67b89dc065b19eb8658a3d93e

digitall 547637+digitall at users.noreply.github.com
Sat May 9 05:18:34 UTC 2020


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:
348661c08d DRAGONS: Fix memset() Usage in LoadingScreenState Constructor


Commit: 348661c08d1346d67b89dc065b19eb8658a3d93e
    https://github.com/scummvm/scummvm/commit/348661c08d1346d67b89dc065b19eb8658a3d93e
Author: D G Turner (digitall at scummvm.org)
Date: 2020-05-09T06:16:19+01:00

Commit Message:
DRAGONS: Fix memset() Usage in LoadingScreenState Constructor

This was not clearing the full member variables as the size of the
elements was not multiplied by the number of elements.

This was flagged up by a GCC compiler warning.

Changed paths:
    engines/dragons/dragons.h


diff --git a/engines/dragons/dragons.h b/engines/dragons/dragons.h
index 2141bc50ff..8632f18bc6 100644
--- a/engines/dragons/dragons.h
+++ b/engines/dragons/dragons.h
@@ -139,8 +139,8 @@ struct LoadingScreenState {
 		loadingFlamesUpdateCounter = 0;
 		loadingFlamesRiseCounter = 0;
 
-		memset(flames, 0, ARRAYSIZE(flames));
-		memset(quads, 0, ARRAYSIZE(quads));
+		memset(flames, 0, ARRAYSIZE(flames)*sizeof(flames[0]));
+		memset(quads, 0, ARRAYSIZE(quads)*sizeof(quads[0]));
 	}
 };
 




More information about the Scummvm-git-logs mailing list