fix a bug in cs_close(): improper check on handle value

This commit is contained in:
Nguyen Anh Quynh 2014-02-27 23:42:49 +08:00
parent 226d7dca64
commit ef3d04d75b
1 changed files with 1 additions and 1 deletions

2
cs.c
View File

@ -179,7 +179,7 @@ cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle)
cs_err cs_close(csh *handle)
{
if (*handle)
if (*handle == 0)
// invalid handle
return CS_ERR_CSH;