scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 42f7511dd83a60b3f1d60ddbfaa821c6b6d34698
parent 33d749d24c838c86f206c8d1bf69ee47ea3f28f4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 18 Dec 2017 21:05:36 +0100

[as] Fix split()

Split() missed a else keyword and the logic was totally
fucked.

Diffstat:
Mas/parser.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/as/parser.c b/as/parser.c @@ -54,7 +54,6 @@ static char * field(char **oldp, size_t *siz) { char *s, *begin; - int c; if ((begin = *oldp) == NULL) return NULL; @@ -62,7 +61,7 @@ field(char **oldp, size_t *siz) if (*begin == '/') { *begin = '\0'; *oldp = NULL; - } if (s = memchr(begin, '\t', *siz)) { + } else if (s = memchr(begin, '\t', *siz)) { *s++ = '\0'; *siz -= s - begin; *oldp = s;