aboutsummaryrefslogtreecommitdiffstats
path: root/src/string.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-20 23:07:41 +0000
committerDavid Robillard <d@drobilla.net>2012-02-20 23:07:41 +0000
commit2bbd923eb74ffae7575d2aa36e1e31f8644e1a18 (patch)
treeae5cd112a3b255bfb3ad7f2e7b7469901b10316a /src/string.c
parent2b2e4f1007d216841358009f8ee0cadee2c69bb6 (diff)
downloadserd-2bbd923eb74ffae7575d2aa36e1e31f8644e1a18.tar.gz
serd-2bbd923eb74ffae7575d2aa36e1e31f8644e1a18.tar.bz2
serd-2bbd923eb74ffae7575d2aa36e1e31f8644e1a18.zip
Fix collection parsing code to not leak stack space.
Collection parsing now truly uses O(1) memory. Trim some fat. git-svn-id: http://svn.drobilla.net/serd/trunk@309 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c
index 650d10b1..b9072d86 100644
--- a/src/string.c
+++ b/src/string.c
@@ -45,8 +45,7 @@ serd_strlen(const uint8_t* str, size_t* n_bytes, SerdNodeFlags* flags)
// Does not start with `10', start of a new character
++n_chars;
switch (str[i]) {
- case '\r':
- case '\n':
+ case '\r': case '\n':
*flags |= SERD_HAS_NEWLINE;
break;
case '"':