dcpu16

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 8edef0087c2720964f76c07576781811529b5eeb
parent 3982443b346c6cf5fba7b34e24a805a05304cb07
Author: Brian Swetland <swetland@gmail.com>
Date:   Fri,  6 Apr 2012 19:12:54 -0700

Merge pull request #10 from Wollw/master

a16: allow underscores in labels
Diffstat:
Massembler.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/assembler.c b/assembler.c @@ -187,11 +187,11 @@ nextline: tnumber = strtoul(lineptr-1, &lineptr, 0); return tNUMBER; } - if (isalpha(c)) { + if (isalpha(c) || c == '_') { int n; char *x = tstring; lineptr--; - while (isalnum(*lineptr)) + while (isalnum(*lineptr) || *lineptr == '_') *x++ = tolower(*lineptr++); *x = 0; for (n = 0; n <= LASTKEYWORD; n++)