st/oxr: Fix crash

This commit is contained in:
Jakob Bornecrantz 2021-02-16 22:45:04 +00:00
parent 2b539f9750
commit 5b61a9b905

View file

@ -124,6 +124,12 @@ min_size_t(size_t a, size_t b)
static bool
starts_with(const char *with, const char *string)
{
assert(with != NULL);
if (string == NULL) {
return false;
}
for (uint32_t i = 0; with[i] != 0; i++) {
if (string[i] != with[i]) {
return false;