1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

win32/win32.c Fix PROT_EXEC bit flag check for FlushInstrucitonCache()

This commit is contained in:
nagachika 2021-12-29 19:31:47 +09:00 committed by usa
parent db547a3bc4
commit d5fc3fa4db
Notes: git 2021-12-30 21:16:48 +09:00

View file

@ -8264,7 +8264,7 @@ rb_w32_mprotect(void *addr, size_t len, int prot)
return -1;
}
*/
if (prot | PROT_EXEC) {
if (prot & PROT_EXEC) {
if (!FlushInstructionCache(GetCurrentProcess(), addr, len)) {
errno = rb_w32_map_errno(GetLastError());
return -1;