fixed null check bugs in hawk_gem_geterrbinf() and hawk_getm_geterruinf()

This commit is contained in:
hyung-hwan 2023-07-03 00:39:31 +09:00
parent 6047a2d858
commit 9fb716d5a3

View File

@ -300,7 +300,7 @@ void hawk_gem_geterrbinf (hawk_gem_t* gem, hawk_errbinf_t* errinf)
/*errinf->num = gem->errnum;*/
errinf->loc.line = gem->errloc.line;
errinf->loc.colm = gem->errloc.colm;
if (gem->errloc.file) errinf->loc.file = HAWK_NULL;
if (!gem->errloc.file) errinf->loc.file = HAWK_NULL;
else
{
mbslen = HAWK_COUNTOF(gem->xerrlocfile);
@ -323,7 +323,7 @@ void hawk_gem_geterruinf (hawk_gem_t* gem, hawk_erruinf_t* errinf)
/*errinf->num = gem->errnum;*/
errinf->loc.line = gem->errloc.line;
errinf->loc.colm = gem->errloc.colm;
if (gem->errloc.file) errinf->loc.file = HAWK_NULL;
if (!gem->errloc.file) errinf->loc.file = HAWK_NULL;
else
{
wcslen = HAWK_COUNTOF(gem->xerrlocfile);