From f29b3658b0caa7af2a3972de09069b9ba80eb494 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 22 Dec 2014 22:46:52 +0100 Subject: 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. --- engines/agi/loader_v2.cpp | 2 +- engines/agi/loader_v3.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/agi') 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; -- cgit v1.2.3