.IF B,< > is supposed to be TRUE

because spaces are blank.
Seen in Kermit, although perhaps the author didn't mean that (MESSAGE < >).
This commit is contained in:
Olaf Seibert
2015-05-22 01:32:45 +02:00
parent 60af942129
commit 536d1856f0

View File

@@ -758,26 +758,24 @@ static int assemble(
cp = value->cp; cp = value->cp;
ok = eval_undefined(value); ok = eval_undefined(value);
free_tree(value); free_tree(value);
} else if (strcmp(label, "B") == 0) { } else if (strcmp(label, "B") == 0 ||
strcmp(label, "NB") == 0) {
char *thing; char *thing;
cp = skipwhite(cp); cp = skipwhite(cp);
if (!EOL(*cp)) if (EOL(*cp)) {
thing = getstring(cp, &cp); ok = 1;
else } else {
thing = memcheck(strdup("")); char *thing, *end;
ok = (*thing == 0);
free(thing);
} else if (strcmp(label, "NB") == 0) {
char *thing;
cp = skipwhite(cp);
if (!EOL(*cp))
thing = getstring(cp, &cp); thing = getstring(cp, &cp);
else end = skipwhite(thing);
thing = memcheck(strdup("")); ok = (*end == 0);
ok = (*thing != 0); free(thing);
free(thing); }
if (label[0] == 'N') {
ok = !ok;
}
} else if (strcmp(label, "IDN") == 0) { } else if (strcmp(label, "IDN") == 0) {
char *thing1, char *thing1,
*thing2; *thing2;