From 1e604828b11984a597a2b357566e8422f2ae82ab Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 1 Jun 2007 19:44:38 +0000 Subject: [PATCH] Don't try to yasm_expr_copy(NULL). Found by: zzuf svn path=/trunk/yasm/; revision=1867 --- modules/objfmts/coff/coff-objfmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/objfmts/coff/coff-objfmt.c b/modules/objfmts/coff/coff-objfmt.c index 1df7c4cf..ae3ee08c 100644 --- a/modules/objfmts/coff/coff-objfmt.c +++ b/modules/objfmts/coff/coff-objfmt.c @@ -1844,7 +1844,7 @@ dir_setframe(yasm_object *object, yasm_valparamhead *valparams, code->loc = get_curpos(object, "SETFRAME", line); code->opcode = UWOP_SET_FPREG; code->info = (unsigned int)(*reg & 0xF); - yasm_value_initialize(&code->off, yasm_expr_copy(off), 8); + yasm_value_initialize(&code->off, off ? yasm_expr_copy(off) : NULL, 8); SLIST_INSERT_HEAD(&objfmt_coff->unwind->codes, code, link); } -- 2.40.0