From 9fb716d5a3433849cb526edee070dc969831007a Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 3 Jul 2023 00:39:31 +0900 Subject: [PATCH] fixed null check bugs in hawk_gem_geterrbinf() and hawk_getm_geterruinf() --- lib/err.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/err.c b/lib/err.c index 5bcf898b..0499b3d3 100644 --- a/lib/err.c +++ b/lib/err.c @@ -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);