nusb/kb: set usage to 0 (undefined) for items exceeding usage list

This commit is contained in:
cinap_lenrek 2016-09-28 19:25:23 +02:00
parent 9cb3e5900e
commit 062a46607e

View file

@ -234,8 +234,7 @@ repparse1(uchar *d, uchar *e, int g[], int l[], int c,
for(i=l[UsagMin]; i<=l[UsagMax] && l[UsgCnt] < Nu; i++)
l[Nl + l[UsgCnt]++] = i;
for(i=0; i<g[RepCnt]; i++){
if(i < l[UsgCnt])
l[Usage] = l[Nl + i];
l[Usage] = i < l[UsgCnt] ? l[Nl + i] : 0;
(*f)(t, v, g, l, c, a);
}
break;