On build of a project I am getting an Assertion failed pointing at this code. Any ideas why please? I have tried a cleaning, deleting derived data, closing xcode and more. Any help please.
unsigned int
FNVForCString(
const char* s)
{
assert(s);
unsigned int hash = 2166136261;
int ch;
while (0 != (ch = *s++))
{
hash *= 16777619;
hash ^= ch;
}
return hash;
}
Just going to say it is failing on the assert(s); line.
Is the language C? I’ve made that assumption here, though the answer varies very little if this is Objective-C.
The value you pass into the function is
NULLThe
assertis there to say “If the valuesisNULL, fail at this point.