about summary refs log tree commit diff stats
path: root/src/utils/twtstr.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-01-26 18:16:03 +0100
committerbptato <nincsnevem662@gmail.com>2022-01-26 18:16:03 +0100
commit402f7595b6c63e668ae09c040410bfa13de5b588 (patch)
treea7d5cca20a0167aefde23ea54e561662db42177b /src/utils/twtstr.nim
parentef37b1119ec78801ab72a76dc750c0b8bfd52af5 (diff)
downloadchawan-402f7595b6c63e668ae09c040410bfa13de5b588.tar.gz
Fix potential crash in next link command
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r--src/utils/twtstr.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 6db61fc2..428276f1 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -851,7 +851,7 @@ func width*(s: seq[Rune], min: int): int =
     inc i
 
 func breaksWord*(r: Rune): bool =
-  return not (r.isDigitAscii() or r.isAlpha() or r.width() == 0)
+  return not (r.isDigitAscii() or r.width() == 0 or r.isAlpha())
 
 const CanHaveDakuten = "かきくけこさしすせそたちつてとはひふへほカキクケコサシスセソタチツテトハヒフヘホ".toRunes()