aboutsummaryrefslogtreecommitdiff
path: root/base/runtime
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-04-30 09:10:00 +0100
committergingerBill <bill@gingerbill.org>2024-04-30 09:10:00 +0100
commit5c1201fa422639f0c70bb772b29f3cfb4c0e3d04 (patch)
treeb3c085ca9f0781a03211e7e63d20d756e1a9cae3 /base/runtime
parentff0973e0f55e5c1d3aad4b80dc73e740fde4105c (diff)
Fix #3459
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