Permalink
Browse files

Fix potential crash with unknown adapter type.

  • Loading branch information...
matlo committed Sep 4, 2018
1 parent a4dd0f2 commit 44da90189c4325833d8edd87883d449bfe6f5c5b
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/controller.c
View
@@ -628,7 +628,7 @@ e_gimx_status adapter_detect()
rtype = adapter_send_short_command(i, BYTE_TYPE);
}
if(rtype >= 0)
if(rtype >= 0 && rtype < C_TYPE_NONE)
{
ginfo(_("GIMX adapter detected, controller type is: %s.\n"), controller_get_name(rtype));

0 comments on commit 44da901

Please sign in to comment.