mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-09 19:36:29 +00:00
Fixed build warning
This commit is contained in:
@@ -88,7 +88,10 @@ Uint32 FNVHash(Uint32* buf, int length) {
|
|||||||
* Wraps the FNV-1a hash for an input surface's pixels
|
* Wraps the FNV-1a hash for an input surface's pixels
|
||||||
*/
|
*/
|
||||||
Uint32 hashSurfacePixels(SDL_Surface * surface) {
|
Uint32 hashSurfacePixels(SDL_Surface * surface) {
|
||||||
Uint64 buffer_size = surface->w * surface->h;
|
int buffer_size = surface->w * surface->h;
|
||||||
|
if (buffer_size < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return FNVHash(surface->pixels, buffer_size);
|
return FNVHash(surface->pixels, buffer_size);
|
||||||
}
|
}
|
||||||
/* ================= Test Case Implementation ================== */
|
/* ================= Test Case Implementation ================== */
|
||||||
|
Reference in New Issue
Block a user