ref: d44f42589d20b1285bd9e155f54a1c2937f18583
parent: 4d2efcd9e1fb32a723e0ed9222c12d07cf782f0b
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Sep 26 06:57:33 EDT 2017
[as] Get rid of : in labels definition
--- a/as/parser.c
+++ b/as/parser.c
@@ -88,9 +88,14 @@
extract(char *s, struct line *lp)
{
int r = 0;
+ size_t len;
- if (lp->label = field(&s))
+ if (lp->label = field(&s)) {
+ len = strlen(lp->label);
+ if (lp->label[len-1] == ':')
+ lp->label[len-1] = '\0';
r++;
+ }
if (lp->op = field(&s))
r++;
if (lp->args = field(&s))