no message

This commit is contained in:
BADIM-PC\Vadim 2017-11-10 18:06:39 +03:00
parent a9781b8ffc
commit e6fd93ad96
1 changed files with 15 additions and 13 deletions

View File

@ -1638,20 +1638,19 @@ static void buf2str(const void* data, s32 size, char* ptr, bool flip)
}
}
static bool bufferEmpty(const u8* data, s32 size)
{
for(s32 i = 0; i < size; i++)
if(*data++)
return false;
return true;
}
static char* printBuf(char* ptr, const void* data, s32 size, s32 row)
{
{
bool empty = true;
const u8* dataPtr = data;
for(s32 i = 0; i < size; i++)
if(*dataPtr++)
{
empty = false;
break;
}
if(empty) return ptr;
}
if(bufferEmpty(data, size))
return ptr;
sprintf(ptr, "-- %03i:", row);
ptr += strlen(ptr);
@ -1667,7 +1666,10 @@ static char* printBuf(char* ptr, const void* data, s32 size, s32 row)
static char* printSection(char* ptr, const char* tag, s32 count, const u8* data, s32 size)
{
sprintf(ptr, "\n-- %s:\n", tag);
if(bufferEmpty(data, size * count))
return ptr;
sprintf(ptr, "\n-- ### %s:\n", tag);
ptr += strlen(ptr);
for(s32 i = 0; i < count; i++, data += size)