aboutsummaryrefslogtreecommitdiff
path: root/base/runtime
diff options
context:
space:
mode:
authorAndreas T Jonsson <mail@andreasjonsson.se>2024-05-02 09:27:46 +0200
committerAndreas T Jonsson <mail@andreasjonsson.se>2024-05-02 09:27:46 +0200
commit7feff1c11335be9c0d804c3ca93050b7d154aad8 (patch)
tree62c89fcafad6b6c9445cb37153e62a6b23223d39 /base/runtime
parent6bbdbb4447b0a2b5b485ae4351016b05ae79758f (diff)
parentfd582015fe2bbaabc42f78caefec1bd95f4d1465 (diff)
Merged with master
Diffstat (limited to 'base/runtime')
-rw-r--r--base/runtime/internal.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/runtime/internal.odin b/base/runtime/internal.odin
index 6f0445787..3e9c524bd 100644
--- a/base/runtime/internal.odin
+++ b/base/runtime/internal.odin
@@ -1043,8 +1043,8 @@ __write_bits :: proc "contextless" (dst, src: [^]byte, offset: uintptr, size: ui
for i in 0..<size {
j := offset+i
the_bit := byte((src[i>>3]) & (1<<(i&7)) != 0)
- b := the_bit<<(j&7)
- dst[j>>3] = (dst[j>>3] &~ b) | b
+ dst[j>>3] &~= 1<<(j&7)
+ dst[j>>3] |= the_bit<<(j&7)
}
}
@@ -1052,7 +1052,7 @@ __read_bits :: proc "contextless" (dst, src: [^]byte, offset: uintptr, size: uin
for j in 0..<size {
i := offset+j
the_bit := byte((src[i>>3]) & (1<<(i&7)) != 0)
- b := the_bit<<(j&7)
- dst[j>>3] = (dst[j>>3] &~ b) | b
+ dst[j>>3] &~= 1<<(j&7)
+ dst[j>>3] |= the_bit<<(j&7)
}
} \ No newline at end of file