From 40954430dc7926bd4056ad5948abb1440d2f24e9 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 15 Jan 2013 20:57:45 -0800 Subject: [PATCH] Use enum to determine arg length. --- protocols/rdp/src/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protocols/rdp/src/client.c b/protocols/rdp/src/client.c index 147f7d62..5de9b674 100644 --- a/protocols/rdp/src/client.c +++ b/protocols/rdp/src/client.c @@ -109,7 +109,9 @@ enum ARGS_IDX { IDX_COLOR_DEPTH, IDX_DISABLE_AUDIO, IDX_CONSOLE, - IDX_CONSOLE_AUDIO + IDX_CONSOLE_AUDIO, + + RDP_ARGS_COUNT }; int __guac_receive_channel_data(freerdp* rdp_inst, int channelId, uint8* data, int size, int flags, int total_size) { @@ -340,7 +342,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) { */ const guac_rdp_keymap* chosen_keymap = &guac_rdp_keymap_en_us; - if (argc < 9) { + if (argc < RDP_ARGS_COUNT) { guac_protocol_send_error(client->socket, "Wrong argument count received.");