summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Matteo Romano2025-05-12 12:14:14 +0200
committerGravatar Matteo Romano2025-05-12 12:14:14 +0200
commit94b1f37474c7444d8129445ae7984f922cb9c283 (patch)
treeb40a475d5012e3623c0045b30f98e086dd77da7c /src
parentAdd reverse CodePoint iterator (diff)
downloadzg-94b1f37474c7444d8129445ae7984f922cb9c283.tar.gz
zg-94b1f37474c7444d8129445ae7984f922cb9c283.tar.xz
zg-94b1f37474c7444d8129445ae7984f922cb9c283.zip
fix: State.unset* did toggle the bit instead of unsetting it
Diffstat (limited to 'src')
-rw-r--r--src/Graphemes.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Graphemes.zig b/src/Graphemes.zig
index 7bf328a..5780ed4 100644
--- a/src/Graphemes.zig
+++ b/src/Graphemes.zig
@@ -258,7 +258,7 @@ pub const State = struct {
258 self.bits |= 1; 258 self.bits |= 1;
259 } 259 }
260 fn unsetXpic(self: *State) void { 260 fn unsetXpic(self: *State) void {
261 self.bits ^= 1; 261 self.bits &= ~@as(u3, 1);
262 } 262 }
263 263
264 // Regional Indicatior (flags) 264 // Regional Indicatior (flags)
@@ -269,7 +269,7 @@ pub const State = struct {
269 self.bits |= 2; 269 self.bits |= 2;
270 } 270 }
271 fn unsetRegional(self: *State) void { 271 fn unsetRegional(self: *State) void {
272 self.bits ^= 2; 272 self.bits &= ~@as(u3, 2);
273 } 273 }
274 274
275 // Indic Conjunct 275 // Indic Conjunct
@@ -280,7 +280,7 @@ pub const State = struct {
280 self.bits |= 4; 280 self.bits |= 4;
281 } 281 }
282 fn unsetIndic(self: *State) void { 282 fn unsetIndic(self: *State) void {
283 self.bits ^= 4; 283 self.bits &= ~@as(u3, 4);
284 } 284 }
285}; 285};
286 286