forked from github/server
- parsing fucked up quotes when finding escaped chars. - also, removed a warning
This commit is contained in:
parent
1e8af4e0e5
commit
6f9f857a83
2 changed files with 2 additions and 1 deletions
|
@ -477,7 +477,7 @@ random_skill(unit *u, boolean weighted)
|
||||||
for (sv = u->skills; sv != u->skills + u->skill_size; ++sv) {
|
for (sv = u->skills; sv != u->skills + u->skill_size; ++sv) {
|
||||||
if (sv->level>0) {
|
if (sv->level>0) {
|
||||||
if (weighted) {
|
if (weighted) {
|
||||||
if (n<sv->level) return sv->id;
|
if (n<(int)sv->level) return sv->id;
|
||||||
n-=sv->level;
|
n-=sv->level;
|
||||||
} else {
|
} else {
|
||||||
if (n == 0) return sv->id;
|
if (n == 0) return sv->id;
|
||||||
|
|
|
@ -151,6 +151,7 @@ parse_token(const char ** str)
|
||||||
}
|
}
|
||||||
if (escape) {
|
if (escape) {
|
||||||
copy = true;
|
copy = true;
|
||||||
|
escape = false;
|
||||||
} else if (iswspace(ucs)) {
|
} else if (iswspace(ucs)) {
|
||||||
if (quotechar==0) break;
|
if (quotechar==0) break;
|
||||||
copy = true;
|
copy = true;
|
||||||
|
|
Loading…
Reference in a new issue