mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-11 13:10:32 +00:00
Fix for thread message syntax relative to . or $
With a message such as .^ specified, strtol() was used on the caret. On Linux this worked by accident because strtol() doesn't return an error but it fails on, e.g. FreeBSD. Furthermore, it was not possible to specify relative offsets after $.
This commit is contained in:
parent
768116b8b6
commit
8c90754e17
9
seq.c
9
seq.c
@ -185,10 +185,11 @@ parse_relnum(char *a, long cur, long last, long *out)
|
||||
a = ".-1";
|
||||
else if (strcmp(a, ".") == 0)
|
||||
a = ".+0";
|
||||
else if (strcmp(a, "$") == 0)
|
||||
a = "-1";
|
||||
|
||||
if (*a == '.') {
|
||||
if (*a == '$') {
|
||||
a++;
|
||||
base = last;
|
||||
} else if (*a == '.') {
|
||||
a++;
|
||||
base = cur;
|
||||
} else if (*a == '-') {
|
||||
@ -198,7 +199,7 @@ parse_relnum(char *a, long cur, long last, long *out)
|
||||
}
|
||||
|
||||
long d;
|
||||
if (*a == ':') {
|
||||
if (strchr(":=_^", *a)) {
|
||||
d = 0;
|
||||
b = a;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user