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

_v3_old
Nguyen Anh Quynh 11 years ago
parent 226d7dca64
commit ef3d04d75b
  1. 2
      cs.c

@ -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;

Loading…
Cancel
Save