]> granicus.if.org Git - yasm/commitdiff
Correctly warn for map file usage if there are *no* object format
authorPeter Johnson <peter@tortall.net>
Thu, 15 Nov 2007 03:57:34 +0000 (03:57 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 15 Nov 2007 03:57:34 +0000 (03:57 -0000)
directives.

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

frontends/yasm/yasm.c

index 117be48c65eacdb9d338178a486ffb9a737920dc..83d052417fea123f7fe43acbebd965e3851895d0 100644 (file)
@@ -442,10 +442,10 @@ do_assemble(void)
     /* Try to enable the map file via a map NASM directive.  This is
      * somewhat of a hack.
      */
-    if (map_filename && cur_objfmt_module->directives) {
+    if (map_filename) {
         const yasm_directive *dir = &cur_objfmt_module->directives[0];
         matched = 0;
-        for (; dir->name; dir++) {
+        for (; dir && dir->name; dir++) {
             if (yasm__strcasecmp(dir->name, "map") == 0 &&
                 yasm__strcasecmp(dir->parser, "nasm") == 0) {
                 yasm_valparamhead vps;