浏览代码

Fix fuzzing test error

yhirose 1 年之前
父节点
当前提交
bda74db01d
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      httplib.h

+ 1 - 2
httplib.h

@@ -342,8 +342,7 @@ inline unsigned char to_lower(int c) {
       240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
       255,
   };
-  assert(0 <= c && c < 256);
-  return table[c];
+  return table[(unsigned char)(char)c];
 }
 
 struct case_ignore_equal {