kbdfs: properly handle zero length write to kbdin

This commit is contained in:
cinap_lenrek 2012-02-26 20:19:58 +01:00
parent 11e38d21c8
commit cbb83c4fce

View file

@ -1114,9 +1114,9 @@ fswrite(Req *r)
case Qkbdin:
p = r->ifcall.data;
n = r->ifcall.count;
if(n <= 0)
n = 0;
r->ofcall.count = n;
if(n == 0)
break;
if(p[n-1] != 0){
/*
* old format as used by bitsy keyboard: