summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-12-23 11:27:01 -0600
committerEdward Thomson <ethomson@microsoft.com>2014-12-23 11:27:01 -0600
commitfe5f7722f5207634c1ef22c74552702e80572048 (patch)
treeb12b1b20d6f5a72da58347a6c8987ef0a8f361fc
parente8cd4321233d6ca23a06d6469b1bb939138eafe6 (diff)
downloadlibgit2-fe5f7722f5207634c1ef22c74552702e80572048.tar.gz
don't treat 0x85 as whitespace
A byte value of 0x85 is not whitespace, we were conflating that with U+0085 (UTF8: 0xc2 0x85). This caused us to incorrectly treat valid multibyte characters like U+88C5 (UTF8: 0xe8 0xa3 0x85) as whitespace.
-rw-r--r--src/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index 7cfc0d644..2567838e6 100644
--- a/src/util.h
+++ b/src/util.h
@@ -317,12 +317,12 @@ GIT_INLINE(bool) git__isdigit(int c)
GIT_INLINE(bool) git__isspace(int c)
{
- return (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == '\v' || c == 0x85 /* Unicode CR+LF */);
+ return (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == '\v');
}
GIT_INLINE(bool) git__isspace_nonlf(int c)
{
- return (c == ' ' || c == '\t' || c == '\f' || c == '\r' || c == '\v' || c == 0x85 /* Unicode CR+LF */);
+ return (c == ' ' || c == '\t' || c == '\f' || c == '\r' || c == '\v');
}
GIT_INLINE(bool) git__iswildcard(int c)