]> granicus.if.org Git - yasm/commitdiff
Don't try to yasm_expr_copy(NULL).
authorPeter Johnson <peter@tortall.net>
Fri, 1 Jun 2007 19:44:38 +0000 (19:44 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 1 Jun 2007 19:44:38 +0000 (19:44 -0000)
Found by: zzuf

svn path=/trunk/yasm/; revision=1867

modules/objfmts/coff/coff-objfmt.c

index 1df7c4cf37fbfb4388a1a2822a63909d1e69a012..ae3ee08cb4feab6852fd3b88763db72146682428 100644 (file)
@@ -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);
 }