mirror of https://github.com/encounter/SDL.git
Fix crash when detecting SIMD
This commit is contained in:
parent
cf33f1f0ef
commit
2dab79bcc2
|
@ -362,10 +362,12 @@ CPU_haveARMSIMD(void)
|
||||||
if (aux.a_type == AT_PLATFORM)
|
if (aux.a_type == AT_PLATFORM)
|
||||||
{
|
{
|
||||||
const char *plat = (const char *) aux.a_un.a_val;
|
const char *plat = (const char *) aux.a_un.a_val;
|
||||||
|
if (plat) {
|
||||||
arm_simd = strncmp(plat, "v6l", 3) == 0 ||
|
arm_simd = strncmp(plat, "v6l", 3) == 0 ||
|
||||||
strncmp(plat, "v7l", 3) == 0;
|
strncmp(plat, "v7l", 3) == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
return arm_simd;
|
return arm_simd;
|
||||||
|
|
Loading…
Reference in New Issue