diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-04-30 20:52:26 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-04-30 20:52:26 +0000 |
commit | 6768eb71d8debde65562619c938b997aea1bd9f9 (patch) | |
tree | 93fc4f4a6d66891ace9494b737aa4b2c1bed37ef /labels.c | |
parent | d7ed89eac9580f280fe0017b22c8e38ca75ed8e3 (diff) | |
download | nasm-6768eb71d8debde65562619c938b997aea1bd9f9.tar.gz |
NASM 0.95nasm-0.95
Diffstat (limited to 'labels.c')
-rw-r--r-- | labels.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -133,7 +133,8 @@ void define_label_stub (char *label, efunc error) { lptr = find_label (label, 1); if (!lptr) error (ERR_PANIC, "can't find label `%s' on pass two", label); - prevlabel = lptr->defn.label; + if (*label != '.') + prevlabel = lptr->defn.label; } } @@ -156,7 +157,7 @@ void define_label (char *label, long segment, long offset, if (label[0] != '.') /* not local, but not special either */ prevlabel = lptr->defn.label; - else if (!*prevlabel) + else if (label[1] != '.' && !*prevlabel) error(ERR_NONFATAL, "attempt to define a local label before any" " non-local labels"); @@ -282,6 +283,7 @@ static char *perm_copy (char *string1, char *string2) { if (perm_tail->size - perm_tail->usage < len) { perm_tail->next = (struct permts *)nasm_malloc(sizeof(struct permts)); perm_tail = perm_tail->next; + perm_tail->next = NULL; perm_tail->size = PERMTS_SIZE; perm_tail->usage = 0; } |