kbdfs: properly handle zero length write to kbdin

front
cinap_lenrek 2012-02-26 20:19:58 +01:00
parent 11e38d21c8
commit cbb83c4fce
1 changed files with 2 additions and 2 deletions

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: