mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-23 04:07:43 +02:00
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
diff --git a/src/sprite.cc b/src/sprite.cc
|
|
index 926370d..3521fe6 100644
|
|
--- a/src/sprite.cc
|
|
+++ b/src/sprite.cc
|
|
@@ -354,7 +354,7 @@ bool Sprite::Load(unsigned char *Buf,long &P)
|
|
// Fabrique la surface
|
|
Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8,
|
|
0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3));
|
|
- if(Image[i]<=NULL) {
|
|
+ if(Image[i]==NULL) {
|
|
cerr <<"Impossible de créer une Surface SDL!"<<endl;
|
|
return false;
|
|
}
|
|
@@ -488,7 +488,7 @@ bool Sprite::Nouveau(int Lx,int Ly)
|
|
// Fabrique la surface
|
|
Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8,
|
|
0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3));
|
|
- if(Image[0]<=NULL) {
|
|
+ if(Image[0]==NULL) {
|
|
cerr <<"Impossible de créer une Surface SDL!"<<endl;
|
|
return false;
|
|
}
|
|
diff --git a/src/tableau.cc b/src/tableau.cc
|
|
index ddbc096..095bf0a 100644
|
|
--- a/src/tableau.cc
|
|
+++ b/src/tableau.cc
|
|
@@ -87,7 +87,7 @@ bool Tableau::Save(void)
|
|
|
|
// Alloue la mémoire
|
|
Buf=new unsigned char [sizeof(s_Tableau)*N+sizeof(int)+1];
|
|
- if(Buf<=0) return false;
|
|
+ if(Buf-=0) return false;
|
|
|
|
// Charge les tableaux
|
|
Buf[0]=N/256;
|