Change the IOGetVirtMem return value test to == -1 instead of < 0 which may include valid addresses

This commit is contained in:
tezcatli
2017-01-12 20:43:23 -08:00
committed by Iwan Timmer
parent 27ad18c3bd
commit 4c9412cd86

View File

@@ -116,7 +116,7 @@ static void decoder_renderer_setup(int videoFormat, int width, int height, int r
exit(EXIT_FAILURE);
}
if (IOGetVirtMem(&mem_desc) <= 0) {
if (IOGetVirtMem(&mem_desc) == -1) {
fprintf(stderr, "Can't get virtual memory address\n");
exit(EXIT_FAILURE);
}