[Scummvm-cvs-logs] SF.net SVN: scummvm: [21524] scummvm/trunk/engines/scumm/he
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Apr 1 04:27:02 CEST 2006
Revision: 21524
Author: kirben
Date: 2006-04-01 04:26:50 -0800 (Sat, 01 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21524&view=rev
Log Message:
-----------
Always check array bounds are valid in HE games, matching original
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/script_v100he.cpp
scummvm/trunk/engines/scumm/he/script_v72he.cpp
scummvm/trunk/engines/scumm/he/script_v90he.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v100he.cpp 2006-04-01 11:25:08 UTC (rev 21523)
+++ scummvm/trunk/engines/scumm/he/script_v100he.cpp 2006-04-01 12:26:50 UTC (rev 21524)
@@ -634,6 +634,8 @@
if (id == 0) {
defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end);
}
+ checkArrayLimits(array, dim2start, dim2end, dim1start, dim1end);
+
tmp2 = 0;
while (dim2start <= dim2end) {
tmp = dim1start;
@@ -674,6 +676,7 @@
if (id == 0) {
defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end);
}
+ checkArrayLimits(array, dim2start, dim2end, dim1start, dim1end);
offs = (b >= c) ? 1 : -1;
tmp2 = c;
Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-04-01 11:25:08 UTC (rev 21523)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-04-01 12:26:50 UTC (rev 21524)
@@ -1422,6 +1422,8 @@
if (id == 0) {
defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end);
}
+ checkArrayLimits(array, dim2start, dim2end, dim1start, dim1end);
+
tmp2 = 0;
while (dim2start <= dim2end) {
tmp = dim1start;
@@ -1462,6 +1464,7 @@
if (id == 0) {
defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end);
}
+ checkArrayLimits(array, dim2start, dim2end, dim1start, dim1end);
offs = (b >= c) ? 1 : -1;
tmp2 = c;
Modified: scummvm/trunk/engines/scumm/he/script_v90he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v90he.cpp 2006-04-01 11:25:08 UTC (rev 21523)
+++ scummvm/trunk/engines/scumm/he/script_v90he.cpp 2006-04-01 12:26:50 UTC (rev 21524)
@@ -2320,6 +2320,7 @@
int dim2end = pop();
int dim2start = pop();
getArrayDim(array, &dim2start, &dim2end, &dim1start, &dim1end);
+ checkArrayLimits(array, dim2start, dim2end, dim1start, dim1end);
sortArray(array, dim2start, dim2end, dim1start, dim1end, sortOrder);
}
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list