From 8d05067ac7b4588179314df73e708c73aa28b6a7 Mon Sep 17 00:00:00 2001 From: Tibor Nagy <xnagytibor@gmail.com> Date: Wed, 28 Nov 2018 20:30:19 +0100 Subject: [PATCH] ctype: fix isspace to test all space class characters --- src/header/ctype/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/header/ctype/mod.rs b/src/header/ctype/mod.rs index 59e5c0ce..43df4741 100644 --- a/src/header/ctype/mod.rs +++ b/src/header/ctype/mod.rs @@ -54,7 +54,12 @@ pub extern "C" fn ispunct(c: c_int) -> c_int { #[no_mangle] pub extern "C" fn isspace(c: c_int) -> c_int { - (c == 0x20) as c_int + (c == ' ' as c_int + || c == '\t' as c_int + || c == '\n' as c_int + || c == '\r' as c_int + || c == 0x0b + || c == 0x0c) as c_int } #[no_mangle] -- GitLab