Add 32 null bytes at end of PI1 files to make ST Deluxe Paint happy (reported by tobe)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@361 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2008-11-25 18:58:50 +00:00
parent 436e3f15fd
commit 8ce30de525
2 changed files with 5 additions and 2 deletions

View File

@@ -4858,7 +4858,7 @@ void Save_PI1(void)
if ((Fichier=fopen(Nom_du_fichier,"wb")))
{
// allocation d'un buffer mémoire
buffer=(byte *)malloc(32034);
buffer=(byte *)malloc(32066);
// Codage de la résolution
buffer[0]=0x00;
buffer[1]=0x00;
@@ -4883,7 +4883,9 @@ void Save_PI1(void)
}
}
if (write_bytes(Fichier,buffer,32034))
memset(buffer+32034,0,32); // 32 extra NULL bytes at the end of the file to make ST Deluxe Paint happy
if (write_bytes(Fichier,buffer,32066))
{
fclose(Fichier);
}