mirror of
https://github.com/0intro/wmii
synced 2025-01-19 08:39:28 +03:00
Fixed null pointer exception for dirs 1> than the greatest index
This commit is contained in:
parent
550f47230b
commit
918815c6d5
@ -386,7 +386,7 @@ qid_of_name(PackedQid wqid[IXP_MAX_WELEM], unsigned short qsel, char *name)
|
||||
if(sscanf(name, "%d", &i) != 1)
|
||||
return nil;
|
||||
for(f=a->frame; f && i; f=f->anext, i--);
|
||||
if(i)
|
||||
if(!f)
|
||||
return nil;
|
||||
new.i3id= f->id;
|
||||
}
|
||||
@ -398,7 +398,7 @@ qid_of_name(PackedQid wqid[IXP_MAX_WELEM], unsigned short qsel, char *name)
|
||||
if(sscanf(name, "%d", &i) != 1)
|
||||
return nil;
|
||||
for(c=client; i && c; c=c->next, i--);
|
||||
if(i)
|
||||
if(!c)
|
||||
return nil;
|
||||
new.type= IXP_QTDIR;
|
||||
new.ptype= FsDGclient;
|
||||
|
Loading…
Reference in New Issue
Block a user