aboutsummaryrefslogtreecommitdiff
path: root/tests/hex.h
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-07-21 17:51:04 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-07-21 17:51:04 -0400
commit12feb33dba2061415d6f39fa59dec16fafcda2a0 (patch)
tree04bf99d4072209a6a69ddf6ea1b3e2eba37315a8 /tests/hex.h
parentffe42b6858f112a00405be4f0605ab1163063749 (diff)
Push latest changes, patches, and internal upgrades
Diffstat (limited to 'tests/hex.h')
-rw-r--r--tests/hex.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/hex.h b/tests/hex.h
index e6a2a07..3cfe559 100644
--- a/tests/hex.h
+++ b/tests/hex.h
@@ -68,6 +68,7 @@ static span_t _fromHexString(const char* hexLiteral, uint32_t strLen)
if(!hexLiteral)
{
+ ncSpanInit(&hexBytes, NULL, 0);
return hexBytes;
}
@@ -125,13 +126,13 @@ static void PrintHexRaw(void* bytes, size_t len)
*/
static void PrintHexBytes(span_t hexBytes)
{
- if (!hexBytes.data)
+ if (ncSpanIsValid(hexBytes))
{
- puts("NULL");
+ PrintHexRaw(hexBytes.data, hexBytes.size);
}
else
{
- PrintHexRaw(hexBytes.data, hexBytes.size);
+ puts("NULL");
}
}