Skip to content

Commit

Permalink
Fixed a minor bug in Compiler::comment().
Browse files Browse the repository at this point in the history
  • Loading branch information
kobalicek committed Feb 15, 2015
1 parent a587fc9 commit 31f8813
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/asmjit/base/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,14 @@ CommentNode* Compiler::comment(const char* fmt, ...) {
char* p = buf;

if (fmt) {
*p++ = ';';
*p++ = ' ';

va_list ap;
va_start(ap, fmt);
p += vsnprintf(p, 254, fmt, ap);
va_end(ap);
}

p[0] = '\n';
p[1] = '\0';

return addComment(fmt);
p[0] = '\0';
return addComment(buf);
}

// ============================================================================
Expand Down

0 comments on commit 31f8813

Please sign in to comment.