diff --git a/libc/src/string/string_utils.h b/libc/src/string/string_utils.h
--- a/libc/src/string/string_utils.h
+++ b/libc/src/string/string_utils.h
@@ -166,8 +166,9 @@
   cpp::bitset<256> bitset;
 
   for (; *segment; ++segment)
-    bitset.set(*segment);
-  for (; *src && !bitset.test(*src); ++src)
+    bitset.set(*reinterpret_cast<const unsigned char *>(segment));
+  for (; *src && !bitset.test(*reinterpret_cast<const unsigned char *>(src));
+       ++src)
     ;
   return src - initial;
 }