/kbd: option should be unsigned

This commit is contained in:
Daryl Poe 2014-04-04 14:09:48 -06:00
parent 2604ff20bd
commit fc6b72017f

View File

@ -1165,17 +1165,17 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
}
CommandLineSwitchCase(arg, "kbd")
{
int id;
unsigned long int id;
char* pEnd;
id = strtol(arg->Value, &pEnd, 16);
id = strtoul(arg->Value, &pEnd, 16);
if (pEnd != (arg->Value + strlen(arg->Value)))
id = 0;
if (id == 0)
{
id = freerdp_map_keyboard_layout_name_to_id(arg->Value);
id = (unsigned long int) freerdp_map_keyboard_layout_name_to_id(arg->Value);
if (!id)
{
@ -1183,7 +1183,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
}
}
settings->KeyboardLayout = id;
settings->KeyboardLayout = (UINT32) id;
}
CommandLineSwitchCase(arg, "kbd-type")
{