improve debug output of Load_SCR()

This commit is contained in:
Thomas Bernard
2019-12-06 00:22:25 +01:00
parent 06d69ac90a
commit 6c388020b0
3 changed files with 34 additions and 11 deletions

View File

@@ -30,3 +30,14 @@ void * GFX2_malloc_and_log(size_t size, const char * file, unsigned line)
file, line, (unsigned long)size);
return p;
}
int GFX2_is_mem_filled_with(const void * p, unsigned char b, size_t len)
{
const unsigned char * pp = (const unsigned char *)p;
while (len-- > 0)
{
if (*pp++ != b)
return 0;
}
return 1;
}