returning default strings on selection of wrong language

git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@481 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2011-08-08 10:52:45 +00:00
parent be145f6d06
commit 0fdb1004eb

View File

@@ -1386,8 +1386,8 @@ static void handle_control (int fd, struct usb_ctrlrequest *setup)
"... get string %d lang %04x\n",
tmp, index);
if (tmp != 0 && index != strings.language) {
fprintf (stderr, "wrong language\n");
goto stall;
fprintf (stderr, "wrong language, returning defaults\n");
tmp = 0;
}
memset (buf, 0, 256); /* zero all the bytes */
result = usb_gadget_get_string (&strings, tmp, buf);