aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano2014-12-22 22:46:52 +0100
committerPino Toscano2014-12-22 23:10:31 +0100
commitf29b3658b0caa7af2a3972de09069b9ba80eb494 (patch)
tree956b7effa2d59f04b26390650ee38d640882078a
parente8fd25e22f4bce6f6df1a49115ece58bc76bdda3 (diff)
downloadscummvm-rg350-f29b3658b0caa7af2a3972de09069b9ba80eb494.tar.gz
scummvm-rg350-f29b3658b0caa7af2a3972de09069b9ba80eb494.tar.bz2
scummvm-rg350-f29b3658b0caa7af2a3972de09069b9ba80eb494.zip
AGI: use shorter sizes for buffers
Instead of allocate them with MAXPATHLEN as size, just give them the size for the data that are going to be written on them.
-rw-r--r--engines/agi/loader_v2.cpp2
-rw-r--r--engines/agi/loader_v3.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp
index 3f164b7fc0..693c53c2bf 100644
--- a/engines/agi/loader_v2.cpp
+++ b/engines/agi/loader_v2.cpp
@@ -135,7 +135,7 @@ int AgiLoader_v2::unloadResource(int t, int n) {
*/
uint8 *AgiLoader_v2::loadVolRes(struct AgiDir *agid) {
uint8 *data = NULL;
- char x[MAXPATHLEN];
+ char x[6];
Common::File fp;
unsigned int sig;
Common::String path;
diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp
index b90c17a1f3..39759b4649 100644
--- a/engines/agi/loader_v3.cpp
+++ b/engines/agi/loader_v3.cpp
@@ -198,7 +198,7 @@ int AgiLoader_v3::unloadResource(int t, int n) {
* NULL is returned if unsucsessful.
*/
uint8 *AgiLoader_v3::loadVolRes(AgiDir *agid) {
- char x[MAXPATHLEN];
+ char x[8];
uint8 *data = NULL, *compBuffer;
Common::File fp;
Common::String path;