mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
fix XTVERSION parsing for unbound version strings
This commit is contained in:
parent
2895615e06
commit
a95b28c2e5
@ -742,10 +742,12 @@ extract_version(query_state* qstate, size_t slen){
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
extract_xtversion(query_state* qstate, size_t slen, char suffix){
|
extract_xtversion(query_state* qstate, size_t slen, char suffix){
|
||||||
if(qstate->runstring[qstate->stridx - 1] != suffix){
|
if(suffix){
|
||||||
return -1;
|
if(qstate->runstring[qstate->stridx - 1] != suffix){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
qstate->runstring[qstate->stridx - 1] = '\0';
|
||||||
}
|
}
|
||||||
qstate->runstring[qstate->stridx - 1] = '\0';
|
|
||||||
return extract_version(qstate, slen);
|
return extract_version(qstate, slen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user