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.
This commit is contained in:
Pino Toscano 2014-12-22 22:46:52 +01:00
parent e8fd25e22f
commit f29b3658b0
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;