summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2021-12-29 19:31:47 +0900
committerusa <usa@garbagecollect.jp>2021-12-30 21:16:29 +0900
commitd5fc3fa4dbf2d6decb6c2582eed6fd2d8003c70c (patch)
tree4c53746d7894a3db411101a2732a4422fa1df2fe /win32/win32.c
parentdb547a3bc457e55c07880ae5d2d77f55b93775eb (diff)
win32/win32.c Fix PROT_EXEC bit flag check for FlushInstrucitonCache()
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5372
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index c9bd18c8cd..d9e719af00 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -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;