[Scummvm-cvs-logs] scummvm master -> 411750ed4ac5e66fe154a946abb44149904b3947

eriktorbjorn eriktorbjorn at telia.com
Tue Dec 27 23:27:50 CET 2011


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:
411750ed4a CRUISE: Fix cppcheck warning about possible NULL pointer use.


Commit: 411750ed4ac5e66fe154a946abb44149904b3947
    https://github.com/scummvm/scummvm/commit/411750ed4ac5e66fe154a946abb44149904b3947
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2011-12-27T14:25:45-08:00

Commit Message:
CRUISE: Fix cppcheck warning about possible NULL pointer use.

Changed paths:
    engines/cruise/dataLoader.cpp



diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 66bc0fb..76479d7 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -369,14 +369,14 @@ int loadFNTSub(uint8 *ptr, int destIdx) {
 
 	destPtr = filesDatabase[fileIndex].subData.ptr;
 
-	memcpy(destPtr, ptr2, loadFileVar1);
-
-	//fontSize = READ_BE_UINT32(ptr2);
-
 	if (destPtr != NULL) {
 		int32 i;
 		uint8 *currentPtr;
 
+		memcpy(destPtr, ptr2, loadFileVar1);
+
+		//fontSize = READ_BE_UINT32(ptr2);
+
 		destPtr = filesDatabase[fileIndex].subData.ptr;
 
 		bigEndianLongToNative((int32 *) destPtr);






More information about the Scummvm-git-logs mailing list