projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
012b9e4
)
segment: Fix implementation of is_all_spaces().
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 30 May 2021 20:30:10 +0000
(13:30 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 30 May 2021 20:31:45 +0000
(13:31 -0700)
src/language/lexer/segment.c
patch
|
blob
|
history
diff --git
a/src/language/lexer/segment.c
b/src/language/lexer/segment.c
index 8d17ce38fe56b4de73d05b764c652a9d9a040594..1a8e8a6b5fb54c479ba988855777aaf3834b0432 100644
(file)
--- a/
src/language/lexer/segment.c
+++ b/
src/language/lexer/segment.c
@@
-227,7
+227,7
@@
is_all_spaces (const char *input_, size_t n)
for (int ofs = 0; ofs < n; ofs += mblen)
{
ucs4_t uc;
- mblen = u8_mbtouc (&uc, input
, n
);
+ mblen = u8_mbtouc (&uc, input
+ ofs, n - ofs
);
if (!lex_uc_is_space (uc))
return false;
}