about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/twtstr.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 0c37439a..c7ba2db6 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -967,8 +967,8 @@ const DoubleWidthTable = (func(): PropertyTable =
   var ptab = makePropertyTable(DoubleWidthRanges, Combining)
   # Control chars return a width of 2, and are displayed as ^{letter}.
   for c in Controls:
-    let i = cast[uint16](c) div 8
-    case cast[uint16](c) mod 8
+    let i = uint16(c) div 8
+    case uint16(c) mod 8
     of 0: ptab[i] = ptab[i] or 0x01
     of 1: ptab[i] = ptab[i] or 0x02
     of 2: ptab[i] = ptab[i] or 0x04